[英]JComponent global method GET doesn't work in Total.js Flow components
我在 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
Flow在settings.NAME_OF_COMPONENT.path
表單中使用 jComponent 范圍。 所以你可以使用GET('settings.name_of_component.url')
或者你可以使用像console.log(settings.name_of_component.url)
這樣的直接調用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.