index.wxml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <wxs
  2. src="./index.wxs"
  3. module="helper" />
  4. <ant-popup
  5. className="ant-actionsheet-popup"
  6. visible="{{ visible }}"
  7. position="bottom"
  8. bind:close="onClose">
  9. <view
  10. style="{{ style }}"
  11. class="ant-actionsheet {{ className ? className : '' }} {{ helper.isIconMode(actions) ? 'ant-actionsheet-icon' : '' }}">
  12. <view
  13. wx:if="{{ title }}"
  14. class="ant-actionsheet-title-wrap">
  15. <view class="ant-actionsheet-title-content">{{ title }}</view>
  16. </view>
  17. <view class="ant-actionsheet-list">
  18. <block
  19. wx:for="{{ actions }}"
  20. wx:for-index="index"
  21. wx:for-item="item"
  22. wx:key="{{ index }}">
  23. <view
  24. class="ant-actionsheet-list-item {{ item.disabled ? 'ant-actionsheet-list-item-disabled' : '' }}"
  25. hover-class="{{ item.disabled ? '' : 'ant-actionsheet-list-item-active' }}"
  26. bind:tap="onAction"
  27. data-index="{{ index }}"
  28. data-item="{{ item }}">
  29. <view
  30. wx:if="{{ helper.isIconMode(actions) }}"
  31. class="ant-actionsheet-list-item-icon"
  32. style="background-image: url('{{ item.icon }}')" />
  33. <view class="ant-actionsheet-list-item-content">
  34. <view
  35. class="ant-actionsheet-list-item-title {{ item.danger ? 'ant-actionsheet-list-item-title-danger' : '' }}">
  36. {{ item.text }}
  37. </view>
  38. <view
  39. wx:if="{{ item.description }}"
  40. class="ant-actionsheet-list-item-description">
  41. {{ item.description }}
  42. </view>
  43. </view>
  44. </view>
  45. </block>
  46. </view>
  47. <view class="ant-actionsheet-cancel-gap" />
  48. <view
  49. class="ant-actionsheet-cancel"
  50. bind:tap="onClose">
  51. {{ cancelText }}
  52. </view>
  53. </view>
  54. </ant-popup>