时间:2019-05-03 来源:小程序工厂
自己解决了。。。。。。
//获取varchar类型的值
getvarchar: function(event) {
var arr = this.data.List;
for (var i = 0; i < arr.length; i++) {
if (arr[i].FIELDNAME == event.currentTarget.dataset.name) {
arr[i].VALUE = event.detail.value;
}
}
console.log(event);
},
//获取select类型的值
getselect: function(event) {
var arr = this.data.List;
for (var i = 0; i < arr.length; i++) {
if (arr[i].FIELDNAME == event.currentTarget.dataset.name) {
arr[i].SELECTINDEX = event.detail.value;
arr[i].VALUE = arr[i].CODE[event.detail.value].value;
event.currentTarget.dataset.value = arr[i].CODE[event.detail.value].value;
}
}
this.setData({
List: arr
});
template.getselect(event)
},
好扯淡的方案