在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
不说这么多,直接上代码
<swiper class="swiper-block" previous-margin="90rpx" next-margin="90rpx" autoplay="{{yearOutoplay}}" current="0" circular='true' bindchange="yearSwiperChange" > <block wx:for="{{yearimgUrls}}" wx:index="{{index}}" wx:key=''> <swiper-item class="swiper-item"> <image mode="aspectFill" src="{{item.url}}" class="slide-image {{swiperCurrent == index ? 'active' : ''}}"/> </swiper-item> </block> </swiper>
swiperCurrent: 0, yearOutoplay:false, yearimgUrls: [ { url:'../../images/banner.jpg', }, { url:'../../images/banner.jpg', }, { url:'../../images/banner.jpg', }, ],
yearSwiperChange(e) {
let current = e.detail.current;
let that = this;
that.setData({
swiperCurrent: current,
})
},
|
请发表评论