notification.mjs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. import { buildProps, definePropType } from "../../../utils/vue/props/runtime.mjs";
  2. import { iconPropType } from "../../../utils/vue/icon.mjs";
  3. import { Close } from "@element-plus/icons-vue";
  4. //#region ../../packages/components/notification/src/notification.ts
  5. const notificationTypes = [
  6. "primary",
  7. "success",
  8. "info",
  9. "warning",
  10. "error"
  11. ];
  12. /**
  13. * @deprecated Removed after 3.0.0, Use `NotificationProps` instead.
  14. */
  15. const notificationProps = buildProps({
  16. customClass: {
  17. type: String,
  18. default: ""
  19. },
  20. dangerouslyUseHTMLString: Boolean,
  21. duration: {
  22. type: Number,
  23. default: 4500
  24. },
  25. icon: { type: iconPropType },
  26. id: {
  27. type: String,
  28. default: ""
  29. },
  30. message: {
  31. type: definePropType([
  32. String,
  33. Object,
  34. Function
  35. ]),
  36. default: ""
  37. },
  38. offset: {
  39. type: Number,
  40. default: 0
  41. },
  42. onClick: {
  43. type: definePropType(Function),
  44. default: () => void 0
  45. },
  46. onClose: {
  47. type: definePropType(Function),
  48. required: true
  49. },
  50. position: {
  51. type: String,
  52. values: [
  53. "top-right",
  54. "top-left",
  55. "bottom-right",
  56. "bottom-left"
  57. ],
  58. default: "top-right"
  59. },
  60. showClose: {
  61. type: Boolean,
  62. default: true
  63. },
  64. title: {
  65. type: String,
  66. default: ""
  67. },
  68. type: {
  69. type: String,
  70. values: [...notificationTypes, ""],
  71. default: ""
  72. },
  73. zIndex: Number,
  74. closeIcon: {
  75. type: iconPropType,
  76. default: Close
  77. }
  78. });
  79. const notificationEmits = { destroy: () => true };
  80. //#endregion
  81. export { notificationEmits, notificationProps, notificationTypes };
  82. //# sourceMappingURL=notification.mjs.map