@aplus-frontend/antdv
Version:
Vue basic component library maintained based on ant-design-vue
42 lines (41 loc) • 1.81 kB
TypeScript
import type { CSSProperties } from 'vue';
import type { NoticeProps } from './Notice';
import type { CSSMotionProps } from '../_util/transition';
import type { Key, VueNode } from '../_util/type';
import type { NoticeContent, NotificationState, Placement, StackConfig } from './interface';
export declare function getUuid(): string;
export interface OpenConfig extends NoticeProps {
key: Key;
placement?: Placement;
content?: VueNode;
duration?: number | null;
}
export type Placements = Partial<Record<Placement, OpenConfig[]>>;
export type NoticeFunc = (noticeProps: NoticeContent) => void;
export type HolderReadyCallback = (div: HTMLDivElement, noticeProps: NoticeProps & {
key: Key;
}) => void;
export interface NotificationInstance {
notice: NoticeFunc;
removeNotice: (key: Key) => void;
destroy: () => void;
add: (noticeProps: NoticeContent) => void;
component: Notification;
}
export interface HookNotificationProps {
prefixCls?: string;
transitionName?: string;
animation?: string | CSSMotionProps | ((placement?: Placement) => CSSMotionProps);
maxCount?: number;
closeIcon?: any;
hashId?: string;
remove: (key: Key) => void;
notices: NotificationState;
getStyles?: (placement?: Placement) => CSSProperties;
getClassName?: (placement?: Placement) => string;
onAllRemoved?: VoidFunction;
getContainer?: () => HTMLElement;
stack?: StackConfig;
}
declare const Notification: import("vue").DefineComponent<HookNotificationProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HookNotificationProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
export default Notification;