export interface ItoastifyOffset { x?: number; y?: number; } export interface IToastify { oldestFirst?: boolean; /* 显示的消息内容 */ text?: string; node?: HTMLElement | undefined; /* 延迟多久消失 */ duration?: number; selector?: HTMLElement | undefined; /* 点击toast跳转的链接 */ destination?: string | undefined; newWindow?: boolean; close?: boolean; gravity?: 'top' | 'bottom'; positionLeft?: boolean; position?: 'left' | 'right' | 'center' | 'bottom'; backgroundColor?: string; avatar?: string; className?: string; stopOnFocus?: boolean; offset?: ItoastifyOffset; escapeMarkup?: boolean; ariaLive?: string; style?: any; /* 点击回调 */ onClick?: () => void; /* 回调 */ callback?: () => void; }