banner.wxml 948 B

1234567891011121314151617181920
  1. <view class="swiper" wx:if="{{imgList.length && imgList.length>0}}">
  2. <swiper indicator-dots="{{indicatorDots}}" current="{{currentIndex}}" bindchange="swiperChange"
  3. class="banner-container">
  4. <block wx:for="{{imgList}}" wx:key="index">
  5. <swiper-item class="banner-content">
  6. <van-image src="{{item.imgPath}}" fit="cover" width="{{imgWidth}}" height="{{imgHeight}}"
  7. radius="{{imgRadius}}" bindtap="onTap" data-index="{{index}}"
  8. custom-class="banner-img"/>
  9. </swiper-item>
  10. </block>
  11. </swiper>
  12. <view class="indication">
  13. <block wx:for="{{imgList}}" wx:key="index">
  14. <view class="{{index == currentIndex? 'active' : 'default'}}"></view>
  15. </block>
  16. </view>
  17. </view>
  18. <view wx:else class="default-banner banner-container">
  19. <van-image src="" width="{{imgWidth}}" height="{{imgHeight}}"/>
  20. </view>