|
|
@ -193,7 +193,7 @@ function isArgsProps(content: JointContent): content is ArgsProps {
|
|
|
|
const api: any = {
|
|
|
|
const api: any = {
|
|
|
|
open: notice,
|
|
|
|
open: notice,
|
|
|
|
config: setMessageConfig,
|
|
|
|
config: setMessageConfig,
|
|
|
|
destroy(messageKey?: number | string) {
|
|
|
|
destroy(messageKey?: React.Key) {
|
|
|
|
if (messageInstance) {
|
|
|
|
if (messageInstance) {
|
|
|
|
if (messageKey) {
|
|
|
|
if (messageKey) {
|
|
|
|
const { removeNotice } = messageInstance;
|
|
|
|
const { removeNotice } = messageInstance;
|
|
|
@ -243,7 +243,7 @@ export interface MessageInstance {
|
|
|
|
export interface MessageApi extends MessageInstance {
|
|
|
|
export interface MessageApi extends MessageInstance {
|
|
|
|
warn(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
|
|
|
|
warn(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
|
|
|
|
config(options: ConfigOptions): void;
|
|
|
|
config(options: ConfigOptions): void;
|
|
|
|
destroy(): void;
|
|
|
|
destroy(messageKey?: React.Key): void;
|
|
|
|
useMessage(): [MessageInstance, React.ReactElement];
|
|
|
|
useMessage(): [MessageInstance, React.ReactElement];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|