index.axml 1.9 KB

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