index.wxml 1.2KB

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