# 卡片式
在options
中添加effect
属性并设置为cards
,即可使用3D翻转的切换效果。
<z-swiper v-model="list" :options="options">
<z-swiper-item :custom-style="slideCustomStyle" v-for="(item,index) in list" :key="index">
<image class="image" :src="item" mode="aspectFill">
</image>
</z-swiper-item>
</z-swiper>
slideCustomStyle: {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
borderRadius: '36rpx'
},
options: {
effect: 'cards'
},
list: [
'https://cdn.zebraui.com/zebra-ui/images/swipe-demo/swipe1.jpg',
'https://cdn.zebraui.com/zebra-ui/images/swipe-demo/swipe2.jpg',
'https://cdn.zebraui.com/zebra-ui/images/swipe-demo/swipe3.jpg',
'https://cdn.zebraui.com/zebra-ui/images/swipe-demo/swipe4.jpg',
'https://cdn.zebraui.com/zebra-ui/images/swipe-demo/swipe5.jpg',
],
.image {
height: 640rpx;
width: 480rpx;
border-radius: 24rpx;
}