index.wxml 745 B

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