在Total.js流中,使用客户端方法获取JComponent值的组件(在我的例子中是textbox或input )中存在问题。我尝试过从Componentator开始工作,但是在我的Total.js流中(版本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发布于 2019-06-19 14:01:17
Flow在表单settings.NAME_OF_COMPONENT.path中使用jComponent作用域。所以您可以使用GET('settings.name_of_component.url'),也可以使用像console.log(settings.name_of_component.url)这样的直接调用。
https://stackoverflow.com/questions/56668852
复制相似问题