index.wxml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <wxs module="computed" src="./index.wxs"/>
  2. <view class="van-picker custom-class">
  3. <include src="./toolbar.wxml" wx:if="{{ toolbarPosition === 'top' }}"/>
  4. <view class="van-picker__loading" wx:if="{{ loading }}">
  5. <loading color="#1989fa"/>
  6. </view>
  7. <view
  8. catch:touchmove="noop"
  9. class="van-picker__columns"
  10. style="{{ computed.columnsStyle({ itemHeight, visibleItemCount }) }}"
  11. >
  12. <picker-column
  13. active-class="active-class"
  14. bind:change="onChange"
  15. class="van-picker__column"
  16. custom-class="column-class"
  17. data-index="{{ index }}"
  18. default-index="{{ item.defaultIndex || defaultIndex }}"
  19. initial-options="{{ item.values }}"
  20. item-height="{{ itemHeight }}"
  21. value-key="{{ valueKey }}"
  22. visible-item-count="{{ visibleItemCount }}"
  23. wx:for="{{ computed.columns(columns) }}"
  24. wx:key="index"
  25. />
  26. <view class="van-picker__mask" style="{{ computed.maskStyle({ itemHeight, visibleItemCount }) }}"/>
  27. <view
  28. class="van-picker__frame van-hairline--top-bottom"
  29. style="{{ computed.frameStyle({ itemHeight }) }}"
  30. />
  31. </view>
  32. <include src="./toolbar.wxml" wx:if="{{ toolbarPosition === 'bottom' }}"/>
  33. </view>