$.init();
$.plusReady(function() {
var cityPicker3 = new $.PopPicker({
layer: 3
});
cityPicker3.setData(cityData3);
var showCityPickerButton = doc.getElementById('showCityPicker3');
var cityResult3 = doc.getElementById('cityResult3');
showCityPickerButton.addEventListener('tap', function(event) {
cityPicker3.show(function(items) {
cityResult3.innerText = "你选择的城市是:" + (items[0] || {}).text + " " + (items[1] || {}).text + " " + (items[2] || {}).text;
//返回 false 可以阻止选择框的关闭
//return false;
});
}, false);
});
})(mui, document);
小兜兜_咳咳
- 发布:2015-09-06 23:06
- 更新:2018-12-06 15:49
- 阅读:13973
7 个回复
3***@qq.com
在HBuilder里新建移动APP,选Hello MUI 模板,这个工程里就有mui.picker.min.js
不知道
你已经白mui替换成 $ 符号了;
最后的mui 也应该是 $ 符号。
不知道对不对,我是这样理解的。
小兜兜_咳咳 (作者)
(function($, doc) {
$.init();
$.plusReady(function() {
var cityPicker3 = new $.PopPicker({
layer: 3
});
cityPicker3.setData(cityData3);
var showCityPickerButton = doc.getElementById('showCityPicker3');
var cityResult3 = doc.getElementById('cityResult3');
showCityPickerButton.addEventListener('tap', function(event) {
cityPicker3.show(function(items) {
cityResult3.innerText = "你选择的城市是:" + (items[0] || {}).text + " " + (items[1] || {}).text + " " + (items[2] || {}).text;
//返回 false 可以阻止选择框的关闭
//return false;
});
}, false);
});
})(mui, document);
上面忘了贴一行。
2015-09-07 19:40
小兜兜_咳咳 (作者)
(function($, doc) {
$.init();
$.plusReady(function() {
var cityPicker3 = new $.PopPicker({
layer: 3
});
cityPicker3.setData(cityData3);
var showCityPickerButton = doc.getElementById('showCityPicker3');
var cityResult3 = doc.getElementById('cityResult3');
showCityPickerButton.addEventListener('tap', function(event) {
cityPicker3.show(function(items) {
cityResult3.innerText = "你选择的城市是:" + (items[0] || {}).text + " " + (items[1] || {}).text + " " + (items[2] || {}).text;
//返回 false 可以阻止选择框的关闭
//return false;
});
}, false);
});
})(mui, document);
上面忘了贴一行。
1***@qq.com
怎么没反应啊 这是怎么用的啊
暮云凝碧
请问mui.picker.min.js从哪里下载
3***@qq.com
我也遇到了相同的问题 ,是 mui.poppicker.js 文件报错,怎么解决的呢?
代码辣么多
放进去mui.picker.min.js