ant-design icon indicating copy to clipboard operation
ant-design copied to clipboard

message、notification 的 config 参数在使用 App.useApp() 返回的实例时不生效

Open beginnerJq opened this issue 2 years ago • 2 comments

Reproduction link

Edit on CodeSandbox

Steps to reproduce

分别点击两个按钮即可查看区别

What is expected?

message.config 能够在 useApp 上的 message 生效

What is actually happening?

useApp 上的 message 没有应用 message.config 的参数配置

Environment Info
antd 5.1.6
React react
System MacOS 13.0
Browser Chrome 109.0.5414.119 (Official Build) (arm64)

beginnerJq avatar Jan 30 '23 06:01 beginnerJq

useApp 中的 message 是 hooks 实例,不受静态方法 config 影响。 App 可以添加配置这些 api 的能力。

MadCcc avatar Jan 30 '23 07:01 MadCcc

useApp 中的 message 是 hooks 实例,不受静态方法 config 影响。 App 可以添加配置这些 api 的能力。

好的,谢谢。

现在的问题是我使用的是暗色主题,必须用 useApp 的形式使用 message,那这样就是没办法配置 message 了 🥲

beginnerJq avatar Jan 30 '23 09:01 beginnerJq

Close by #40458

yoyo837 avatar Feb 15 '23 07:02 yoyo837