notification.mjs 1.4 KB

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