index.wxml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <wxs src="./index.wxs" module="computed" />
  2. <van-popup
  3. round
  4. class="van-share-sheet"
  5. show="{{ show }}"
  6. position="bottom"
  7. overlay="{{ overlay }}"
  8. duration="{{ duration }}"
  9. z-index="{{ zIndex }}"
  10. overlay-style="{{ overlayStyle }}"
  11. close-on-click-overlay="{{ closeOnClickOverlay }}"
  12. safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
  13. root-portal="{{ rootPortal }}"
  14. bind:close="onClose"
  15. bind:click-overlay="onClickOverlay"
  16. >
  17. <view class="van-share-sheet__header">
  18. <view class="van-share-sheet__title">
  19. <slot name="title" />
  20. </view>
  21. <view wx:if="{{ title }}" class="van-share-sheet__title">{{ title }}</view>
  22. <view class="van-share-sheet__description">
  23. <slot name="description" />
  24. </view>
  25. <view wx:if="{{ description }}" class="van-share-sheet__description">
  26. {{ description }}
  27. </view>
  28. </view>
  29. <block wx:if="{{ computed.isMulti(options) }}">
  30. <options
  31. wx:for="{{ options }}"
  32. show-border="{{ index !== 0 }}"
  33. wx:key="index"
  34. options="{{ item }}"
  35. bind:select="onSelect"
  36. />
  37. </block>
  38. <options wx:else options="{{ options }}" bind:select="onSelect" />
  39. <button type="button" class="van-share-sheet__cancel" bindtap="onCancel">
  40. {{ cancelText }}
  41. </button>
  42. </van-popup>