<swiper autoplay indicator-dots indicator-color="rgba(255,255,255,0.2)" indicator-active-color="white" circular interval="3000" style="width: {{width}};height: 400rpx;" bindtap="move">
<swiper-item wx:for="{{banner}}" wx:key="index">
<image src="{{item.imgUrl}}" style="width: 100%;height: 100%;" />
</swiper-item>
</swiper>
//xxx.js 组件接收父传递的值
// props 父传子的参数
properties: {
banner: {
type: Array,
},
width:{
type:String
}
},
//父组件调用 需在 .json文件引入自定义轮播组件
"usingComponents": {
"mySwiper":"../../components/mySwiper"
},
//页面直接调用
<mySwiper banner="{{banner}}" width="{{'750rpx'}}" wx:if="{{showSwiper}}"></mySwiper>
11-24
950
950
06-22
1649
1649

被折叠的 条评论
为什么被折叠?



