Swiper中文论坛
标题:
vue中使用swiper loop:ture不能点击
[打印本页]
作者:
other408
时间:
2019-7-31 09:57
标题:
vue中使用swiper loop:ture不能点击
往回滑的时候,第一个图和最后一个轮播图不能点击
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="site in list6" @click="href(site)">
<img :src="site.img" >
</div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination"></div>
<script>
var swiper = new Swiper('.swiper-container', {
spaceBetween: 20,
slidesPerView: 1.2,
centeredSlides: true,
slideToClickedSlide: true,
grabCursor: true,
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
scrollbar: '.swiper-scrollbar',
pagination: '.swiper-pagination',
history: 'slide',
loop : true,
loopAdditionalSlides : 0,
autoplay: {
delay: 2000,
disableOnInteraction: true,
}
});
</script>
欢迎光临 Swiper中文论坛 (http://bbs.swiper.com.cn/)
Powered by Discuz! X3.2