index.axml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <view class='picker-index {{className}}' style='{{style}}' ref='saveChildRef0'>
  2. <import-sjs from="./index.axmlisSimple.sjs" name='isSimple'>
  3. </import-sjs>
  4. <view class='van-picker {{customClass}}'>
  5. <block a:if="{{ toolbarPosition === 'top' }}" a:for='{{ [{ showToolbar, cancelButtonText, title, confirmButtonText }] }}' a:for-item='amitem' _is='toolbar' ref-numbers='{{ [{ showToolbar, cancelButtonText, title, confirmButtonText }] }}'>
  6. <view a:if='{{ amitem.showToolbar }}' class='van-picker__toolbar {{toolbarClass}}'>
  7. <view class='van-picker__cancel' hover-class='van-picker__cancel--hover' hover-stay-time='70' data-type='cancel' onTap='antmoveAction' data-antmove-tap='emit'>
  8. {{ amitem.cancelButtonText }}
  9. </view>
  10. <view a:if='{{ amitem.title }}' class='van-picker__title van-ellipsis'>
  11. {{
  12. amitem.title
  13. }}
  14. </view>
  15. <view class='van-picker__confirm' hover-class='van-picker__confirm--hover' hover-stay-time='70' data-type='confirm' onTap='antmoveAction' data-antmove-tap='emit'>
  16. {{ amitem.confirmButtonText }}
  17. </view>
  18. </view>
  19. </block>
  20. <view a:if='{{ loading }}' class='van-picker__loading'>
  21. <custom-loading color='#1989fa' ref='saveChildRef1'>
  22. </custom-loading>
  23. </view>
  24. <view class='van-picker__columns' style='height: {{ itemHeight * visibleItemCount }}px' catchTouchMove='antmoveAction' data-antmove-touchmove='noop'>
  25. <picker-column class='van-picker__column' a:for='{{ isSimple(columns) ? [columns] : columns }}' a:key='{{*this}}' data-index='{{ index }}' custom-class='{{columnClass}}' value-key='{{ valueKey }}' initial-options='{{ isSimple(columns) ? item : item.values }}' default-index='{{ item.defaultIndex || defaultIndex }}' item-height='{{ itemHeight }}' visible-item-count='{{ visibleItemCount }}' active-class='{{activeClass}}' onChange='onChange' ref-numbers='{{ isSimple(columns) ? [columns] : columns }}' ref='saveChildRef1'>
  26. </picker-column>
  27. <view class='van-picker__mask' style='background-size: 100% {{ (itemHeight * visibleItemCount - itemHeight) / 2 }}px'>
  28. </view>
  29. <view class='van-picker__frame van-hairline--top-bottom' style='height: {{ itemHeight }}px'>
  30. </view>
  31. </view>
  32. <block a:if="{{ toolbarPosition === 'bottom' }}" a:for='{{ [{ showToolbar, cancelButtonText, title, confirmButtonText }] }}' a:for-item='amitem' _is='toolbar' ref-numbers='{{ [{ showToolbar, cancelButtonText, title, confirmButtonText }] }}'>
  33. <view a:if='{{ amitem.showToolbar }}' class='van-picker__toolbar {{toolbarClass}}'>
  34. <view class='van-picker__cancel' hover-class='van-picker__cancel--hover' hover-stay-time='70' data-type='cancel' onTap='antmoveAction' data-antmove-tap='emit'>
  35. {{ amitem.cancelButtonText }}
  36. </view>
  37. <view a:if='{{ amitem.title }}' class='van-picker__title van-ellipsis'>
  38. {{
  39. amitem.title
  40. }}
  41. </view>
  42. <view class='van-picker__confirm' hover-class='van-picker__confirm--hover' hover-stay-time='70' data-type='confirm' onTap='antmoveAction' data-antmove-tap='emit'>
  43. {{ amitem.confirmButtonText }}
  44. </view>
  45. </view>
  46. </block>
  47. </view>
  48. </view>