效果:

代码:
export default {
data() {
return {
indicatorDots: true,
autoplay: true,
interval:4000,
duration:500,
currentSwiper:0,
swiperItemIndex:0,
imgList:[{
text:"图片",
img: 'https://img.zcool.cn/community/0167e05e0b1597a8012165187c5e9f.jpg@3000w_1l_0o_100sh.jpg'
},
{
text: "图片",
img: 'https://img.zcool.cn/community/01add45e0b1595a80121651829067f.jpg@1280w_1l_2o_100sh.jpg'
},
{
text: "图片",
img: 'https://img.zcool.cn/community/01ff685e0b15e3a80120a895326d92.jpg@2o.jpg'
},
]
};
},
methods: {
/**
* @swiperChangeFun:换取当前轮播图的index值
swiperChangeFun(e) {
this.swiperItemIndex = e.detail.current;
},
},