icon.ts 748 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import {
  2. CircleCheck,
  3. CircleClose,
  4. CircleCloseFilled,
  5. Close,
  6. InfoFilled,
  7. Loading,
  8. SuccessFilled,
  9. WarningFilled,
  10. } from '@element-plus/icons-vue'
  11. import { definePropType } from './props'
  12. import type { Component } from 'vue'
  13. export const iconPropType = definePropType<string | Component>([
  14. String,
  15. Object,
  16. Function,
  17. ])
  18. export const CloseComponents = {
  19. Close,
  20. }
  21. export const TypeComponents = {
  22. Close,
  23. SuccessFilled,
  24. InfoFilled,
  25. WarningFilled,
  26. CircleCloseFilled,
  27. }
  28. export const TypeComponentsMap = {
  29. success: SuccessFilled,
  30. warning: WarningFilled,
  31. error: CircleCloseFilled,
  32. info: InfoFilled,
  33. }
  34. export const ValidateComponentsMap = {
  35. validating: Loading,
  36. success: CircleCheck,
  37. error: CircleClose,
  38. }