const swiper = new Swiper('.swiper-more-offer-container', {
direction: 'vertical',
loop: false, // 默认循环模式为false,为避免循环模式后动态复制的猜你喜欢和offer本身绑定的点击事件不生效,不开启循环模式
pagination: {
el: '.swiper-more-offer-container .swiper-pagination',
},
paginationType: 'bullets',
initialSlide: 1,// 默认从swiper2开始展示,即 moreoffer请求到后优先展示moreoffer
resistanceRatio : 0, // 修复iOS下橡皮筋问题
freeMode: false,
longSwipesRatio : 0.5,
passiveListeners : false,
});
如题,我希望每次滑动,翻到下一页,或上一页,而不是上下一页各展示了一半,相当于停留在半路,不滑了,大家有遇到此类问题吗?
试试这俩
observer: true, //修改swiper自己或子元素时,自动初始化swiper
observeParents: true, //修改swiper的父元素时,自动初始化swiper