index.wxml 1010 B

123456789101112131415161718192021222324
  1. <wxs module="utils" src="../wxs/utils.wxs"/>
  2. <wxs module="computed" src="./index.wxs"/>
  3. <view
  4. bind:touchcancel="onTouchEnd"
  5. bind:touchend="onTouchEnd"
  6. bind:touchstart="onTouchStart"
  7. catch:touchmove="onTouchMove"
  8. class="van-picker-column custom-class"
  9. style="{{ computed.rootStyle({ itemHeight, visibleItemCount }) }}"
  10. >
  11. <view style="{{ computed.wrapperStyle({ offset, itemHeight, visibleItemCount, duration }) }}">
  12. <view
  13. bindtap="onClickItem"
  14. class="van-ellipsis {{ utils.bem('picker-column__item', { disabled: option && option.disabled, selected: index === currentIndex }) }} {{ index === currentIndex ? 'active-class' : '' }}"
  15. data-index="{{ index }}"
  16. style="height: {{ itemHeight }}px"
  17. wx:for="{{ options }}"
  18. wx:for-item="option"
  19. wx:key="index"
  20. >{{ computed.optionText(option, valueKey) }}
  21. </view>
  22. </view>
  23. </view>