index.wxml 783 B

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