x***@163.com
x***@163.com
  • 发布:2017-04-11 14:35
  • 更新:2017-04-11 15:18
  • 阅读:2935

mui poppicker 三级联动 手机运行异常

分类:MUI

数据动态加载后,在浏览器中运行是正常的


,在hbuilder基本运行时不正常,
,而且手机上运行时,需要点击两次才可以选择。

页面代码如下:
<div class="mui-content">
<div class="mui-content-padded">
<button id='showCityPicker3' class="mui-btn mui-btn-block" type='button'>三级联动示例 ...</button>
<div id='cityResult3' class="ui-alert"></div>
</div>
</div>

var showCityPickerButton = document.getElementById('showCityPicker3');
var cityResult3 = document.getElementById('cityResult3');
showCityPickerButton.addEventListener('tap', function(event) {
var cityPicker3 = new $.PopPicker({
layer: 3
});
cityPicker3.setData(cityData);
cityPicker3.show(function(items) {
cityResult3.innerText = "你选择的城市是:" + (items[0] || {}).text + " " + (items[1] || {}).text + " " + (items[2] || {}).text;
//返回 false 可以阻止选择框的关闭
//return false;
cityPicker3.dispose();
});
}, false);

2017-04-11 14:35 负责人:无 分享
已邀请:
x***@163.com

x***@163.com (作者)

已经解决,将页面中的css、js换成
<link href="../../css/mui.picker.all.css" rel="stylesheet" />
<link href="../../css/mui.picker.min.css" rel="stylesheet" />

<script src="../../js/mui.picker.all.js"></script>
<script src="../../js/mui.picker.min.js"></script>

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