mui('#refreshContainer').pullRefresh().endPullupToRefresh();
结合使用按照文档会报提示.endPullupToRefresh()函数不存在
各种百度尝试后试了下面方法好了
在mounted 函数中加入下面代码
mui.init();
this.$nextTick(
() => {
mui('.mui-scroll-wrapper').scroll({
deceleration: 0.0005,
indicators: false, //是否显示滚动条
});
const that =this;
mui("#refreshContainer").pullRefresh({
up: {
callback: function() {
var self = this;
setTimeout(function() {
that.logPage += 1;
that.getData(); //你的函数调用
}, 1000);
},
}
});
然后在getData函数中加入下列代码
mui('#refreshContainer').pullRefresh().endPullupToRefresh();
就能在vue 中cli的调用mui的下拉刷新啦 上拉刷新也是同理 踩坑已踩