请输入昵称
请输入昵称
  • 发布:2016-01-28 17:35
  • 更新:2016-01-28 17:35
  • 阅读:1800

二级联动取值问题

分类:MUI

mui 的选择器案例,二级联动,数据存在 city.js

省——1000
children:
市1——1001
市2——1002
市3——1003
市4——1004
市5——1005

怎么通过 1004 获取 市4,
即 通过 value 获取 text

附:
一级选择器,修改 mui.picker.js
Picker.prototype.getSelectedText = function(value) {
var self = this;
for (var index in self.items) {
var item = self.items[index];
if (item.value == value) {
return (self.items[index] || {}).text;
}
}
};
web 调用
userPicker.pickers[0].getSelectedText( value值 )

2016-01-28 17:35 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复