版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
swiper轮播图设置自动轮播之后如果手动滑动之后,就不会再自动轮播了
解决方法:
var swiper = new Swiper(' .swiper-container', {
pagination: {
el: '.swiper-pagination',
},
loop: true,
autoplay:true,
autoplay: {
disableOnInteraction: false
}
});
设置autoplay:true之后,再设置
autoplay:{
disableOnInteraction: false
}