index.wxml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <view class="van-picker custom-class">
  2. <view
  3. wx:if="{{ showToolbar }}"
  4. class="van-picker__toolbar van-hairline--top-bottom toolbar-class"
  5. >
  6. <view class="van-picker__cancel" data-type="cancel" bindtap="emit">
  7. {{ cancelButtonText || '取消' }}
  8. </view>
  9. <view wx:if="{{ title }}" class="van-picker__title van-ellipsis">{{ title }}</view>
  10. <view class="van-picker__confirm" data-type="confirm" bindtap="emit">
  11. {{ confirmButtonText || '确认' }}
  12. </view>
  13. </view>
  14. <view wx:if="{{ loading }}" class="van-picker__loading">
  15. <loading color="#1989fa"/>
  16. </view>
  17. <view
  18. class="van-picker__columns"
  19. style="height: {{ itemHeight * visibleItemCount }}px"
  20. catch:touchmove="noop"
  21. >
  22. <picker-column
  23. class="van-picker__column"
  24. wx:for="{{ simple ? [columns] : columns }}"
  25. wx:key="index"
  26. data-index="{{ index }}"
  27. custom-class="column-class"
  28. value-key="{{ valueKey }}"
  29. initial-options="{{ simple ? item : item.values }}"
  30. default-index="{{ item.defaultIndex }}"
  31. item-height="{{ itemHeight }}"
  32. visible-item-count="{{ visibleItemCount }}"
  33. active-class="active-class"
  34. bind:change="onChange"
  35. />
  36. <view
  37. class="van-picker__frame van-hairline--top-bottom"
  38. style="height: {{ itemHeight }}px"
  39. />
  40. </view>
  41. </view>