PopPicker 往下滑动选择的时候 ,会触发下拉刷新 这个怎么解决 ,请出代码实例谢谢
- 发布:2017-08-16 15:10
- 更新:2018-05-07 15:41
- 阅读:1206
你试试picker显示的时候,禁用下拉刷新;picker消失的时候,启用下拉刷新。看行不行
mui("#pullrefresh").pullRefresh().setStopped(true/false)
-
<div class="mui-content" id="pullrefresh">
<button id='demo5' data-options='{"type":"time"}' class="btn mui-btn mui-btn-block">选择时间 ...</button>
<div type="text" id="inp"/>请选择</div>
</div>
mui.init({
pullRefresh: {
container: '#pullrefresh',
down: {
style:'circle',
callback: pulldownRefresh
}
}
});
function pulldownRefresh(){
setTimeout(function(){
mui('#pullrefresh').pullRefresh().endPulldown();
},1000)
}
//打开时间选择器
var inp = $('#inp');
mui(".mui-content").on('tap','#demo5',function(){
mui('#pullrefresh').pullRefresh().setStopped(true);
that=this
var dtPicker = new mui.DtPicker({"type":"time"});
dtPicker.show(function (selectItems) {
inp.text(selectItems.text)
dtPicker.dispose();
})
},false)
添加了mui('#pullrefresh').pullRefresh().setStopped(true);这句直接报错Cannot set property 'className' of undefined at js/mui.min.js:8,实在不懂~~~
2018-05-09 10:19
1***@qq.com
+1,要请官方回答也是没人回答
2018-05-07 14:57