index.wxml 676 B

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