一、官方文档
二、注意事项
三、卡片式轮播效果图
四、示例代码
blcok标签不做渲染
<view id='banner' style="{{banner == ''?'display:none':''}}">
<!-- <swiper indicator-dots="{{true}}" indicator-color="#ffffff" autoplay="true" circular="true" >
<block wx:for="{{banner}}" wx:key="*this" >
<swiper-item>
<image src='{{item}}'mode="aspectFill" style="width:100%;height:100%;" mode="widthFix" />
</swiper-item>
</block>
</swiper> -->
<swiper class="card-swiper {{DotStyle?'square-dot':'round-dot'}}" indicator-dots="true" circular="true" autoplay="true" interval="5000" duration="500" bindchange="cardSwiper" indicator-color="#8799a3" indicator-active-color="#0081ff">
<swiper-item>
<block>
<!-- <view class="swiper-item"> -->
<video
autoplay
loop
class="swiper-item"
show-play-btn="{{true}}"
controls="{{true}}"
objectFit="cover"
loop='{{false}}'
show-mute-btn='{{true}}'
vslide-gesture-in-fullscreen='{{true}}'
src="https://xxxxx.mp4"
></video>
<!-- </view> -->
</block>
<!-- autoplay
loop="{{false}}"
bindplay="handlePlayVideo"
bindpause = 'handleStopVideo' -->
<!-- show-play-btn="{{true}}" controls="{{true}}" objectFit="cover" loop='{{false}}' show-mute-btn='{{true}}' vslide-gesture-in-fullscreen='{{true}}' -->
</swiper-item>
<swiper-item wx:for="{{banner}}" wx:key="*this" class="{{cardCur==index?'cur':''}}">
<view class="swiper-item">
<image src="{{item}}" mode="aspectFill"></image>
<!-- <video src="{{item.video}}" autoplay loop muted show-play-btn="{{false}}" controls="{{false}}" objectFit="cover" wx:if="{{item.type=='video'}}"></video> -->
</view>
</swiper-item>
</swiper>
</view>