index.axml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <view
  2. a:if="{{ show }}"
  3. class="ant-toast {{ className || '' }} {{ icon || image || type ? 'ant-toast-icon-wrapper' : '' }}"
  4. style="{{ style || '' }}">
  5. <view
  6. a:if="{{ type }}"
  7. class="ant-toast-normal">
  8. <loading
  9. a:if="{{ type === 'loading' }}"
  10. type="mini" />
  11. <am-icon
  12. a:elif="{{ type === 'warning' }}"
  13. type="ExclamationOutline"
  14. className="ant-toast-icon" />
  15. <am-icon
  16. a:elif="{{ type === 'error' }}"
  17. type="CloseOutline"
  18. className="ant-toast-icon" />
  19. <am-icon
  20. a:elif="{{ type === 'success' }}"
  21. type="CheckOutline"
  22. className="ant-toast-icon" />
  23. </view>
  24. <am-icon
  25. a:elif="{{ icon }}"
  26. type="{{ icon }}"
  27. className="ant-toast-icon" />
  28. <view
  29. a:elif="{{ image }}"
  30. style="background-image: url({{ image }})"
  31. class="ant-toast-image" />
  32. <view class="ant-toast-text-body">
  33. <view class="ant-toast-text-box">
  34. <view class="ant-toast-text-content">{{ content.substring(0, 24) }}</view>
  35. </view>
  36. </view>
  37. </view>
  38. <mask
  39. a:if="{{ show && showMask }}"
  40. className="ant-toast-mask"
  41. show="{{ true }}"
  42. onMaskTap="handleClickMask"
  43. style="{{ maskStyle }}" />