action-sheet.wxml 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. <wxs src="./action-sheet.wxs" module="this" />
  2. <import src="./template/action-sheet-list.wxml" />
  3. <import src="./template/action-sheet-grid.wxml" />
  4. <view id="{{classPrefix}}" class="{{classPrefix}} {{prefix}}-class">
  5. <t-popup visible="{{visible}}" placement="bottom" bind:visible-change="onPopupVisibleChange">
  6. <view class="{{classPrefix}}__content {{prefix}}-class-content">
  7. <block wx:if="{{gridThemeItems.length}}">
  8. <template is="grid" data="{{classPrefix, prefix, gridThemeItems, count, currentSwiperIndex}}" />
  9. </block>
  10. <block wx:elif="{{items && items.length}}">
  11. <view class="{{classPrefix}}__list" wx:for="{{ items }}" wx:key="index">
  12. <template
  13. is="list"
  14. data="{{index, classPrefix, listThemeItemClass: this.getListThemeItemClass({ item, prefix, classPrefix }), item}}"
  15. />
  16. </view>
  17. </block>
  18. </view>
  19. <slot />
  20. <view wx:if="{{showCancel}}" class="{{classPrefix}}__footer {{classPrefix}}__safe">
  21. <view class="{{classPrefix}}__gap-{{theme}}" />
  22. <view
  23. class="{{classPrefix}}__cancel {{prefix}}-class-cancel"
  24. hover-class="{{classPrefix}}__cancel--hover"
  25. hover-stay-time="70"
  26. bind:tap="onCancel"
  27. >
  28. {{ cancelText }}
  29. </view>
  30. </view>
  31. </t-popup>
  32. </view>