我正在使用nativescript-Drop-Down插件来处理我的nativescript javascript应用程序。我的问题是我无法触发我的js文件中的selectedIndexChanged事件。Nativescript-Drop-Down在javascript中获取值
在我view_page.xml我有以下
<Page
class="page"
navigatingTo="onNavigatingTo"
xmlns:dd="nativescript-drop-down">
<dd:DropDown id="outletnumber" items="
{{ orderNumbers }}" selectedIndex="{{ selectedIndex }}"
opened="dropDownOpened"
closed="dropDownClosed"
selectedIndexChanged="dropDownSelectedIndexChanged"
row="1" col="1" />
</Page>
在我view_page.js我有这个
exports.dropDownSelectedIndexChanged(arg){
console.log("Drop Down selected index changed from :", args);
}
我没有看到在互联网上的一个很好的例子,使用JavaScript和nativescript-dropdown