ustbhuangyi / picker

[警告]该库作者不再维护,picker 的维护移交至 cube-ui
https://github.com/didi/cube-ui
867 stars 282 forks source link

在一个页面调用两次以上要怎么使用呢 #67

Open huanhuanhome opened 6 years ago

huanhuanhome commented 6 years ago

在一个页面调用两次以上要怎么使用呢

huanhuanhome commented 6 years ago

var picker = new Picker({ data: [first, second, third], selectedIndex: selectedIndex, title: '地址选择' }); 可以多次实例化,

function creatList(obj, list) { obj.forEach(function(item, index, arr) { var temp = new Object(); temp.text = item.name; temp.value = index; temp.code = item.code; list.push(temp); }) }

这里可以修改创建list