notification.d.ts 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import type { ExtractPropTypes, VNode } from 'vue';
  2. import type Notification from './notification.vue';
  3. export declare const notificationTypes: readonly ["success", "info", "warning", "error"];
  4. export declare const notificationProps: {
  5. readonly customClass: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
  6. readonly dangerouslyUseHTMLString: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
  7. readonly duration: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 4500, boolean>;
  8. readonly icon: {
  9. readonly type: import("vue").PropType<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) | ((new (...args: any[]) => (string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>) & {}) | (() => string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>))[], unknown, unknown>>;
  10. readonly required: false;
  11. readonly validator: ((val: unknown) => boolean) | undefined;
  12. __epPropKey: true;
  13. };
  14. readonly id: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
  15. readonly message: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => (string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
  16. [key: string]: any;
  17. }>) & {}) | (() => string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
  18. [key: string]: any;
  19. }>) | ((new (...args: any[]) => (string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
  20. [key: string]: any;
  21. }>) & {}) | (() => string | VNode<import("vue").RendererNode, import("vue").RendererElement, {
  22. [key: string]: any;
  23. }>))[], unknown, unknown, "", boolean>;
  24. readonly offset: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
  25. readonly onClick: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => () => void) | (() => () => void) | {
  26. (): () => void;
  27. new (): any;
  28. readonly prototype: any;
  29. } | ((new (...args: any[]) => () => void) | (() => () => void) | {
  30. (): () => void;
  31. new (): any;
  32. readonly prototype: any;
  33. })[], unknown, unknown, () => undefined, boolean>;
  34. readonly onClose: {
  35. readonly type: import("vue").PropType<() => void>;
  36. readonly required: true;
  37. readonly validator: ((val: unknown) => boolean) | undefined;
  38. __epPropKey: true;
  39. };
  40. readonly position: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "top-right" | "top-left" | "bottom-right" | "bottom-left", unknown, "top-right", boolean>;
  41. readonly showClose: import("element-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
  42. readonly title: import("element-plus/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
  43. readonly type: import("element-plus/es/utils").EpPropFinalized<StringConstructor, "" | "success" | "warning" | "info" | "error", unknown, "", boolean>;
  44. readonly zIndex: import("element-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
  45. };
  46. export declare type NotificationProps = ExtractPropTypes<typeof notificationProps>;
  47. export declare const notificationEmits: {
  48. destroy: () => boolean;
  49. };
  50. export declare type NotificationEmits = typeof notificationEmits;
  51. export declare type NotificationInstance = InstanceType<typeof Notification>;
  52. export declare type NotificationOptions = Omit<NotificationProps, 'id'> & {
  53. appendTo?: HTMLElement | string;
  54. };
  55. export declare type NotificationOptionsTyped = Omit<NotificationOptions, 'type'>;
  56. export interface NotificationHandle {
  57. close: () => void;
  58. }
  59. export declare type NotificationParams = Partial<NotificationOptions> | string | VNode;
  60. export declare type NotificationParamsTyped = Partial<NotificationOptionsTyped> | string | VNode;
  61. export declare type NotifyFn = ((options?: NotificationParams) => NotificationHandle) & {
  62. closeAll: () => void;
  63. };
  64. export declare type NotifyTypedFn = (options?: NotificationParamsTyped) => NotificationHandle;
  65. export interface Notify extends NotifyFn {
  66. success: NotifyTypedFn;
  67. warning: NotifyTypedFn;
  68. error: NotifyTypedFn;
  69. info: NotifyTypedFn;
  70. }
  71. export interface NotificationQueueItem {
  72. vm: VNode;
  73. }
  74. export declare type NotificationQueue = NotificationQueueItem[];