最近在使用swiper实现轮播效果:
swiper版本不同,使用有所不同。
swiper6配置如下:
main.js:
app.vue:
optionsAc: {
direction: 'vertical',
effect: 'coverflow',
slideShadows: false,
coverflow: {
stretch: -40,
depth: 200,
modifier: 2,
rotate: 0
},
slidesPerView: 1, //一行显示3个
spaceBetween: 0, //间隔30
grabCursor: true,
centeredSlides: true,
speed: 1000,
// loop:true,//循环会导致点击切换和显示错位
on: {
slideChangeTransitionEnd (swiper) {
vm.$nextTick(function(){
this.clickAc=swiper.snapIndex
})
}
}
}
swiper6以下配置如下:
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。