index.axml 2.1 KB

123456789101112131415161718192021222324252627282930313233
  1. <view class='action-sheet-index {{className}}' style='{{style}}' ref='saveChildRef0'>
  2. <import-sjs from='../wxs/utils.sjs' name='utils'>
  3. </import-sjs>
  4. <van-popup show='{{ show }}' position='bottom' round='{{ round }}' z-index='{{ zIndex }}' overlay='{{ overlay }}' custom-class='van-action-sheet' safe-area-inset-bottom='{{ safeAreaInsetBottom }}' close-on-click-overlay='{{ closeOnClickOverlay }}' onClose='onClickOverlay' ref='saveChildRef1'>
  5. <view a:if='{{ title }}' class='van-action-sheet__header'>
  6. {{ title }} <van-icon name='cross' custom-class='van-action-sheet__close' class='van-action-sheet__close' onClick='onClose' ref='saveChildRef2'>
  7. </van-icon>
  8. </view>
  9. <view a:if='{{ description }}' class='van-action-sheet__description van-hairline--bottom'>
  10. {{ description }}
  11. </view>
  12. <view a:if='{{ actions && actions.length }}'>
  13. <btn a:for='{{ actions }}' a:key='{{index}}' open-type='{{ item.openType }}' style="{{ item.color ? 'color: ' + item.color : '' }}" class="{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} {{ item.className || '' }}" hover-class='van-action-sheet__item--hover' data-index='{{ index }}' app-parameter='{{ appParameter }}' ref-numbers='{{ actions }}' onGetUserInfo='bindGetUserInfo' onGetPhoneNumber='bindGetPhoneNumber' onOpenSetting='bindOpenSetting' onTap='antmoveAction' data-antmove-tap='onSelect'>
  14. <block a:if='{{ !item.loading }}'>
  15. {{ item.name }} <view a:if='{{ item.subname }}' class='van-action-sheet__subname'>
  16. {{ item.subname }}
  17. </view>
  18. </block>
  19. <van-loading a:else custom-class='van-action-sheet__loading' size='22px' ref='saveChildRef3'>
  20. </van-loading>
  21. </btn>
  22. </view>
  23. <slot>
  24. </slot>
  25. <block a:if='{{ cancelText }}'>
  26. <view class='van-action-sheet__gap'>
  27. </view>
  28. <view class='van-action-sheet__cancel' hover-class='van-action-sheet__cancel--hover' hover-stay-time='70' onTap='antmoveAction' data-antmove-tap='onCancel'>
  29. {{ cancelText }}
  30. </view>
  31. </block>
  32. </van-popup>
  33. </view>