notification.mjs 1.4 KB

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