index.axml 1.1 KB

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