swiper-nav.wxml 849 B

123456789101112131415161718192021
  1. <wxs src="../common/utils.wxs" module="_" />
  2. <view wx:if="{{showControls}}" class="{{classPrefix}}__btn" style="{{customStyle}}">
  3. <view class="{{classPrefix}}__btn--prev" bind:tap="nav" data-dir="prev" />
  4. <view class="{{classPrefix}}__btn--next" bind:tap="nav" data-dir="next" />
  5. </view>
  6. <view
  7. wx:if="{{total >= minShowNum}}"
  8. style="{{customStyle}}"
  9. class="{{prefix}}-class {{classPrefix}} {{classPrefix}}--{{direction}} {{classPrefix}}__{{type}} {{classPrefix}}--{{paginationPosition}}"
  10. >
  11. <block wx:if="{{ type === 'dots' || type === 'dots-bar'}}">
  12. <view
  13. wx:for="{{total}}"
  14. wx:for-index="idx"
  15. wx:key="idx"
  16. class="{{_.cls(classPrefix + '__' + type + '-item', [['active', current === idx], direction])}}"
  17. />
  18. </block>
  19. <block wx:if="{{ type === 'fraction'}}"> {{current + 1}}/{{total}} </block>
  20. </view>