微信小程序swiper不能显示的问题

时间:2020-05-23 09:39:10   收藏:0   阅读:200

swiper中轮番播放三个色块,父容器的class为"container"时不能显示出来,现象为白屏,当把container改为其它即可,container应该为swiper的保留字符,

//container改为其他,如:mycontainer

<view class="container">
  <
swiper class="tab-box" current="{{currentTab}}" duration="300" bindchange="switchTab"> <swiper-item wx:for="{{[0,1,2,3,4,5,6,7,8]}}" wx:for-item="tabItem" wx:for-index="idx" wx:key="idx" class="tab-content"> {{tabItem}} <view style="width:100px;height:100px;border:1px solid red; ">哒哒哒哒哒哒</view> </swiper-item> </swiper>
</view>

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!