【发布时间】:2016-02-15 10:42:53
【问题描述】:
我尝试在转发器中进行文本更改并研究此链接。
Basic blur event in a Telerik Nativescript Mobile App
它在单个文本字段中工作,但在转发器中不起作用。是不是设置错了什么?
XML:
<Repeater id="lstSelectedItemsSingle" items="{{itemsSingle}}">
<Repeater.itemTemplate>
<GridLayout columns="auto,*,auto,*,auto" rows="auto,auto,1" padding="6" id = "{{ matchId + dataType + 'GridSingle'}}">
<GridLayout columns="*,*,*" rows="40" col="3" borderRadius="6" borderWidth="1" borderColor="#DBDBDB" >
<button backgroundImage="res://reduce_enable" style="background-repeat:no-repeat;background-position: 50% 50%" backgroundColor="#BFBFBF" />
<TextField col="1" backgroundColor="#ffffff" col="1" text="{{stake}}" style="text-align:center" keyboardType="number" />
<button backgroundImage="res://add_icon_enable" col="2" style="background-repeat:no-repeat;background-position: 50% 50%" backgroundColor="#BFBFBF" col="2"/>
</GridLayout>
</GridLayout>
</Repeater.itemTemplate>
</Repeater>
型号:
exports.onPageLoaded = function(args){
page = args.object;
viewM.set("stake", "2");
viewM.addEventListener(observable.Observable.propertyChangeEvent, function (event) {
console.log(event.propertyName);
}
});
}
【问题讨论】:
-
能否请您详细说明您要实现的目标,并提供一个最小的完整且可验证的示例(stackoverflow.com/help/mcve)
-
您可以尝试使用
ListView对象而不是中继器,这可能会有所不同...
标签: nativescript