我在Total.js Flow中遇到问题,在组件内部使用客户端方法GET检索JComponent的值(在我的情况下为textbox或input)。 我已经从Componentator尝试过并且可以正常工作,但是在我的Total.js Flow(版本6,但5版本有相同的问题)中,它返回未定义。有人知道任何解决方案或更好的方法来进行检索,例如在按钮上单击输入框内的值?
<div class="row">
<div class="col-md-12">
<div data-jc="textbox" data-jc-path="url">@(URL)</div>
</div>
</div>
<button onclick="getUrl()">Try</button> // this call an example function that call the "console.log"
console.log(GET('url')); // return undefined
答案 0 :(得分:1)
流使用IN
形式的jComponent范围。因此,您可以使用settings.NAME_OF_COMPONENT.path
,也可以使用直接调用,例如GET('settings.name_of_component.url')
。