You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.4 KiB
62 lines
1.4 KiB
import type { CSSProperties } from 'vue';
|
|
import type { Key, VueNode } from '../_util/type';
|
|
|
|
export type NotificationPlacement =
|
|
| 'top'
|
|
| 'topLeft'
|
|
| 'topRight'
|
|
| 'bottom'
|
|
| 'bottomLeft'
|
|
| 'bottomRight';
|
|
|
|
export type IconType = 'success' | 'info' | 'error' | 'warning';
|
|
|
|
export interface ArgsProps {
|
|
message: (() => VueNode) | VueNode;
|
|
description?: (() => VueNode) | VueNode;
|
|
btn?: (() => VueNode) | VueNode;
|
|
key?: Key;
|
|
onClose?: () => void;
|
|
duration?: number | null;
|
|
icon?: (() => VueNode) | VueNode;
|
|
placement?: NotificationPlacement;
|
|
style?: CSSProperties;
|
|
class?: string;
|
|
readonly type?: IconType;
|
|
onClick?: () => void;
|
|
closeIcon?: (() => VueNode) | VueNode;
|
|
}
|
|
|
|
type StaticFn = (args: ArgsProps) => void;
|
|
|
|
export interface NotificationInstance {
|
|
success: StaticFn;
|
|
error: StaticFn;
|
|
info: StaticFn;
|
|
warning: StaticFn;
|
|
open: StaticFn;
|
|
destroy(key?: Key): void;
|
|
}
|
|
|
|
export interface GlobalConfigProps {
|
|
top?: number | string;
|
|
bottom?: number | string;
|
|
duration?: number;
|
|
prefixCls?: string;
|
|
getContainer?: () => HTMLElement;
|
|
placement?: NotificationPlacement;
|
|
closeIcon?: (() => VueNode) | VueNode;
|
|
rtl?: boolean;
|
|
maxCount?: number;
|
|
}
|
|
|
|
export interface NotificationConfig {
|
|
top?: number | string;
|
|
bottom?: number | string;
|
|
prefixCls?: string;
|
|
getContainer?: () => HTMLElement;
|
|
placement?: NotificationPlacement;
|
|
maxCount?: number;
|
|
rtl?: boolean;
|
|
}
|