index.wxml 707B

123456789101112131415161718192021222324252627282930
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <view
  3. class="custom-class {{ utils.bem('slider', { disabled }) }}"
  4. style="{{ inactiveColor ? 'background:' + inactiveColor : '' }}"
  5. bind:tap="onClick"
  6. >
  7. <view
  8. class="van-slider__bar"
  9. style="{{ barStyle }}; {{ activeColor ? 'background:' + activeColor : '' }}"
  10. >
  11. <view
  12. class="van-slider__button-wrapper"
  13. bind:touchstart="onTouchStart"
  14. catch:touchmove="onTouchMove"
  15. bind:touchend="onTouchEnd"
  16. bind:touchcancel="onTouchEnd"
  17. >
  18. <slot
  19. wx:if="{{ useButtonSlot }}"
  20. name="button"
  21. />
  22. <view
  23. wx:else
  24. class="van-slider__button"
  25. />
  26. </view>
  27. </view>
  28. </view>