index.wxml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <view class="zan-actionsheet {{ show ? 'zan-actionsheet--show' : '' }}">
  2. <view
  3. class="mask-class zan-actionsheet__mask"
  4. bindtap="onMaskClick"
  5. ></view>
  6. <view class="container-class zan-actionsheet__container">
  7. <!-- 选项按钮 -->
  8. <zan-btn
  9. wx:for="{{ actions }}"
  10. wx:key="this"
  11. bind:btnclick="handleBtnClick"
  12. data-index="{{ index }}"
  13. open-type="{{ item.openType }}"
  14. custom-class="zan-actionsheet__btn"
  15. loading="{{ item.loading }}"
  16. >
  17. <!-- 自定义组件控制 slot 样式有问题,故在 slot 容器上传入 loading 信息 -->
  18. <view class="zan-actionsheet__btn-content {{ item.loading ? 'zan-actionsheet__btn--loading' : '' }}">
  19. <view class="zan-actionsheet__name">{{ item.name }}</view>
  20. <view
  21. wx:if="{{ item.subname }}"
  22. class="zan-actionsheet__subname">
  23. {{ item.subname }}
  24. </view>
  25. </view>
  26. </zan-btn>
  27. <!-- 关闭按钮 -->
  28. <view
  29. wx:if="{{ cancelText }}"
  30. class="zan-actionsheet__footer"
  31. >
  32. <zan-btn
  33. custom-class="zan-actionsheet__btn"
  34. catchtap="cancelClick"
  35. >{{ cancelText }}</zan-btn>
  36. </view>
  37. </view>
  38. </view>