1、apicloud下拉刷新与swiper滑动冲突解决
- 在swiper插件触碰起点屏蔽apicloud的页面弹动事件,触碰终点将其恢复
let pic_swiper = new Swiper ('.swiper-container', {
pagination: {
el: '.swiper-pagination',
},
autoplay:true,
on: {
touchStart: function(event){
api.setFrameAttr({
name: api.frameName,
bounces: false
});
},
touchEnd: function(event){
api.setFrameAttr({
name: api.frameName,
bounces: true
});
},
}
})
网友评论