index.wxml 1.0 KB

1234567891011121314151617181920
  1. <view class="wux-class {{ classes.wrap }}">
  2. <view class="{{ classes.prev }}" wx:if="{{ mode === 'button' }}">
  3. <wux-button wux-class="{{ classes.button }}" bind:click="onPrev" type="light" disabled="{{ activeIndex <= 1 }}">
  4. <slot name="prev"></slot>
  5. </wux-button>
  6. </view>
  7. <view class="{{ classes.number }}" wx:if="{{ mode !== 'pointer' && !simple }}">
  8. <view class="{{ classes.active }}">{{ activeIndex }}</view>/{{ total }}
  9. </view>
  10. <view class="{{ classes.pointer }}" wx:if="{{ mode === 'pointer' }}">
  11. <block wx:for="{{ total }}" wx:key="">
  12. <view class="{{ classes.dot }} {{ index + 1 === activeIndex ? prefixCls + '__dot--active' : '' }}"></view>
  13. </block>
  14. </view>
  15. <view class="{{ classes.next }}" wx:if="{{ mode === 'button' }}">
  16. <wux-button wux-class="{{ classes.button }}" bind:click="onNext" type="light" disabled="{{ activeIndex >= total }}">
  17. <slot name="next"></slot>
  18. </wux-button>
  19. </view>
  20. </view>