action-sheet.wxml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <wxs src="./action-sheet.wxs" module="this" />
  2. <wxs src="../common/utils.wxs" module="_" />
  3. <import src="./template/list.wxml" />
  4. <import src="./template/grid.wxml" />
  5. <view id="{{classPrefix}}" style="{{_._style([style, customStyle])}}" class="{{classPrefix}} {{prefix}}-class">
  6. <t-popup visible="{{visible}}" placement="bottom" bind:visible-change="onPopupVisibleChange">
  7. <view
  8. class="{{_.cls(classPrefix + '__content', [['grid', gridThemeItems.length]])}} {{prefix}}-class-content"
  9. tabindex="0"
  10. >
  11. <view wx:if="{{description}}" tabindex="0" class="{{_.cls(classPrefix + '__description', [align])}}"
  12. >{{description}}</view
  13. >
  14. <block wx:if="{{gridThemeItems.length}}">
  15. <template is="grid" data="{{classPrefix, prefix, gridThemeItems, count, currentSwiperIndex}}" />
  16. </block>
  17. <view wx:elif="{{items && items.length}}" class="{{classPrefix}}__list">
  18. <block wx:for="{{ items }}" wx:key="index">
  19. <template
  20. is="list"
  21. data="{{index, classPrefix, listThemeItemClass: _.cls(classPrefix + '__list-item', [align, [disabled, item.disabled]]), item}}"
  22. />
  23. </block>
  24. </view>
  25. </view>
  26. <slot />
  27. <view wx:if="{{showCancel}}" class="{{classPrefix}}__footer {{classPrefix}}__safe">
  28. <view class="{{classPrefix}}__gap-{{theme}}" />
  29. <view
  30. class="{{classPrefix}}__cancel {{prefix}}-class-cancel"
  31. hover-class="{{classPrefix}}__cancel--hover"
  32. hover-stay-time="70"
  33. bind:tap="onCancel"
  34. aria-role="button"
  35. >
  36. {{ cancelText }}
  37. </view>
  38. </view>
  39. </t-popup>
  40. </view>