notification.js 1.6 KB

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