-
Notifications
You must be signed in to change notification settings - Fork 574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue 4593 #4807
base: master
Are you sure you want to change the base?
Fix issue 4593 #4807
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是您为 Fusion/Next 提的第一个 pr,感谢您为 Fusion 做出的贡献,我们会尽快进行处理。
0114ee1
to
88d6f6d
Compare
|
||
if (typeof config === 'string' || React.isValidElement(config)) { | ||
newConfig.title = config; | ||
} else if (obj.typeOf(config) === 'Object') { | ||
newConfig = { ...config }; | ||
newConfig = { ...(config as MessageQuickProps) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里同上
@@ -18,6 +18,8 @@ const MessageProvider = ConfigProvider.config(Message, { | |||
}); | |||
|
|||
export default MessageProvider; | |||
export type { MessageProps, MessageQuickProps } from './types'; | |||
export type ContextMessage = typeof toast; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个类型的导出感觉没有必要,typeof 是很容易得的。
88d6f6d
to
5b19c57
Compare
}, | ||
afterClose, | ||
}); | ||
delay(200).then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delay 在这里没有意义,get 本身就可以等待四秒
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
包括 cy.wrap 也是如此
|
||
setTimeout(() => { | ||
assert(document.querySelector('.next-overlay-wrapper .next-message.next-message') !== null); | ||
delay(500).then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处同上,所有 delay 都没必要加入,不再赘述,如果哪里必须要加 delay,可以找我讨论
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
type AnyProps = any; | ||
type ConfigMask = InstanceType<typeof NewMask> | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ConfigMask 里感觉不应该包含 null,null 应该是在下面和 ConfigMask 并列
|
||
```js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这部分没有了
animation: PropTypes.bool, | ||
locale: PropTypes.object, | ||
rtl: PropTypes.bool, | ||
}; | ||
static config: (config: MessageConfig) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这四个类方法还是看不懂,如果是外面赋值的,那应该都是放在 assignSubComponents 里的,如果不是,这里又指给了类型没有实现。另外 open 下面那三个确定一下是成员方法还是类方法?
close #4593