Notification.d.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. import type { Key } from '../_util/type';
  2. import type { CSSProperties } from 'vue';
  3. import type { NoticeProps } from './Notice';
  4. export interface NoticeContent extends Omit<NoticeProps, 'prefixCls' | 'noticeKey' | 'onClose'> {
  5. prefixCls?: string;
  6. key?: Key;
  7. updateMark?: string;
  8. content?: any;
  9. onClose?: () => void;
  10. style?: CSSProperties;
  11. class?: String;
  12. }
  13. export declare type NoticeFunc = (noticeProps: NoticeContent) => void;
  14. export declare type HolderReadyCallback = (div: HTMLDivElement, noticeProps: NoticeProps & {
  15. key: Key;
  16. }) => void;
  17. export interface NotificationInstance {
  18. notice: NoticeFunc;
  19. removeNotice: (key: Key) => void;
  20. destroy: () => void;
  21. component: Notification;
  22. }
  23. export interface NotificationProps {
  24. prefixCls?: string;
  25. transitionName?: string;
  26. animation?: string | object;
  27. maxCount?: number;
  28. closeIcon?: any;
  29. }
  30. declare const Notification: import("vue").DefineComponent<NotificationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<NotificationProps>, {
  31. closeIcon?: any;
  32. }>;
  33. export default Notification;