<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}"
interval="{{interval}}" duration="{{duration}}" indicator-color="white"
indicator-active-color="#cccccc">
<block wx:for="{{imgUrls}}" wx:item="item" wx:key="{{index}}">
<swiper-item>
<image mode="aspectFill" src="{{item}}" class="slide-image" />
</swiper-item>
</block>
</swiper>
data = {
imgUrls: [
'https://zxzc.xxwhcm.net/banner/banner1.png' ,
'https://zxzc.xxwhcm.net/banner/banner2.png'
],
indicatorDots: true,
autoplay: true,
interval: 5000,
duration: 1000,
}
小程序swiper 栗子。。。。
网友评论