WXML代码如下:
<swiper autoplay="true" interval="3000" circular="true" duration="800" bindchange="swiperChange">
<block wx:for="{{imgUrls}}" wx:key="index">
<swiper-item>
<image src="{{item}}" class="slide-image" />
</swiper-item>
</block>
</swiper>
<view class="dots">
<block wx:for="{{imgUrls}}" wx:key="index">
<view class="dot{{index == currentSwiper ? ' active' : ''}}"></view>
</block>
</view>
js代码
swiperChange(e) {
let current = e.detail.current;
this.setData({
currentSwiper: current,
})
},
估计你是有什么样式盖住他了,导致无法触摸到
可以每隔800毫秒自动切换图片,但是手动不能切换图片,是样式的问题嘛?