mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
fix: fix message.destroy parameter (#26864)
* fix: fix message.destroy parameter * chore: use React.Key
This commit is contained in:
parent
006abe5e92
commit
cc37f7d189
@ -193,7 +193,7 @@ function isArgsProps(content: JointContent): content is ArgsProps {
|
||||
const api: any = {
|
||||
open: notice,
|
||||
config: setMessageConfig,
|
||||
destroy(messageKey?: number | string) {
|
||||
destroy(messageKey?: React.Key) {
|
||||
if (messageInstance) {
|
||||
if (messageKey) {
|
||||
const { removeNotice } = messageInstance;
|
||||
@ -243,7 +243,7 @@ export interface MessageInstance {
|
||||
export interface MessageApi extends MessageInstance {
|
||||
warn(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
|
||||
config(options: ConfigOptions): void;
|
||||
destroy(): void;
|
||||
destroy(messageKey?: React.Key): void;
|
||||
useMessage(): [MessageInstance, React.ReactElement];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user