问题描述:
swiper 滑动后,滚动内容不自动轮播。
原始代码
<script>
var swiper = new Swiper('.swiper-container', {
loop: true,
autoplay: 2000,//自动切换时间
direction: 'vertical' //轮播方向为纵轴
});
</script>
解决方案:
增加 autoplayDisableOnInteraction : false, //手动播放后继续自动播放;
改进后代码:
<script>
var swiper = new Swiper('.swiper-container', {
loop: true,
autoplay: 2000,//自动切换时间
autoplayDisableOnInteraction : false, //手动播放后继续自动播放
direction: 'vertical'
});
</script>