index.wxml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template name="zan-actionsheet">
  2. <view class="zan-actionsheet {{ show ? 'zan-actionsheet--show' : '' }}">
  3. <view
  4. class="zan-actionsheet__mask"
  5. catchtap="_handleZanActionsheetMaskClick"
  6. data-close-on-click-overlay="{{ closeOnClickOverlay }}"
  7. data-component-id="{{ componentId }}"></view>
  8. <view class="zan-actionsheet__container">
  9. <!-- 实际按钮显示 -->
  10. <button
  11. wx:for="{{ actions }}"
  12. wx:for-index="index"
  13. wx:for-item="item"
  14. wx:key="{{ index }}-{{ item.name }}"
  15. catchtap="_handleZanActionsheetBtnClick"
  16. data-component-id="{{ componentId }}"
  17. data-index="{{ index }}"
  18. open-type="{{ item.openType }}"
  19. class="zan-btn zan-actionsheet__btn {{ item.loading ? 'zan-btn--loading' : '' }} {{ item.className }}"
  20. >
  21. <text>{{ item.name }}</text>
  22. <text
  23. wx:if="{{ item.subname }}"
  24. class="zan-actionsheet__subname">{{ item.subname }}</text>
  25. </button>
  26. <!-- 关闭按钮 -->
  27. <view
  28. wx:if="{{ cancelText }}"
  29. class="zan-actionsheet__footer"
  30. >
  31. <button
  32. class="zan-btn zan-actionsheet__btn"
  33. catchtap="_handleZanActionsheetCancelBtnClick"
  34. data-component-id="{{ componentId }}"
  35. >{{ cancelText }}</button>
  36. </view>
  37. </view>
  38. </view>
  39. </template>