index.wxml 745 Bytes
Newer Older
李嘉林 committed
1
<wxs src="../wxs/utils.wxs" module="utils" />
程默 committed
2
<wxs src="./index.wxs" module="computed" />
李嘉林 committed
3 4 5 6 7 8 9 10

<view
  class="custom-class {{ utils.bem('slider', { disabled }) }}"
  style="{{ inactiveColor ? 'background:' + inactiveColor : '' }}"
  bind:tap="onClick"
>
  <view
    class="van-slider__bar"
程默 committed
11
    style="{{ barStyle }};{{ computed.barStyle(barHeight, activeColor) }}"
李嘉林 committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
  >
    <view
      class="van-slider__button-wrapper"
      bind:touchstart="onTouchStart"
      catch:touchmove="onTouchMove"
      bind:touchend="onTouchEnd"
      bind:touchcancel="onTouchEnd"
    >
      <slot
        wx:if="{{ useButtonSlot }}"
        name="button"
      />
      <view
        wx:else
        class="van-slider__button"
      />
    </view>
  </view>
</view>