/** * toast提示组件, 单例模式,App级别只需要一个ToastComponent,引入了多个会兼容,也只有第一个生效 */ import React from 'react'; import type { ToastComponentProps, ToastItem, ToastMessageProps } from './types'; interface ToastComponentState { items: Array; } export declare class ToastComponent extends React.Component { static defaultProps: Pick; static themeKey: string; hasRendered: boolean; state: ToastComponentState; componentDidMount(): void; componentWillUnmount(): void; notifiy(level: ToastItem['level'], content: string, config?: Partial): void; success(content: string, config?: Partial): void; error(content: string, config?: Partial): void; info(content: string, config?: Partial): void; warning(content: string, config?: Partial): void; handleDismissed(index: number): void; render(): JSX.Element[] | null; } export default ToastComponent; interface ToastMessageState { visible: boolean; } export declare class ToastMessage extends React.Component { static defaultProps: Partial; state: { visible: boolean; }; timer: ReturnType; mounted: boolean; componentDidMount(): void; componentWillUnmount(): void; handleMouseEnter(): void; handleMouseLeave(): void; handleEntered(): void; close(): void; render(): JSX.Element; } export declare const toast: { container: any; success: (content: string, confOrTitle?: Partial | string) => void; error: (content: string, confOrTitle?: Partial | string) => void; info: (content: string, confOrTitle?: Partial | string) => void; warning: (content: string, confOrTitle?: Partial | string) => void; };