js文件
data: {
styleType:1,
pointerStyle:4,
imageList:[
{
src:'../../static/Rectangle 6.png'},
{
src:'../../static/Rectangle 6.png'},
{
src:'../../static/Rectangle 6.png'},
],
largeCurrentSwiper:0
},
swiperChange(e){
this.setData({
largeCurrentSwiper:e.detail.current
})
},
wxml文件
<!-- swiper 自定义指示样式 -->
<swiper class="{
{styleType === 1 ? 'pointOne' : styleType === 2 ? 'pointTwo' : styleType === 3 ? 'pointThree' : styleType === 5 ? 'pointFive' : ''}}" current="{
{largeCurrentSwiper}}" bindchange="swiperChange">
<swiper-item wx:for="{
{imageList}}" style="position: relative;margin: 0 9%;">
<image src="{
{item.src}}"></image>
<!-- 其它样式 -->
<view class="dots" style="position: