ant-design / pro-components

🏆 Use Ant Design like a Pro!
https://pro-components.antdigital.dev
MIT License
3.95k stars 1.27k forks source link

🐛[BUG] 在全局 ProConfigProvider 中配置的 token 不生效 #7171

Closed hungtcs closed 9 months ago

hungtcs commented 9 months ago

🐛 bug 描述

在全局 ProConfigProvider 中配置的 token 不生效,以 ProLayout 为例,必须在 ProLayout 的 props 中配置 token 才会生效,全局配置不生效。

📷 复现步骤

使用 ProConfigProvider 在最外层包裹所有组件,并配置 token。

🏞 期望结果

token 生效。

💻 复现代码

https://codesandbox.io/s/ji-chu-shi-yong-forked-pio434?file=/App.tsx

© 版本信息

🚑 其他信息

可能是此处覆盖了全局配置,但是没有从全局配置中继承。

https://github.com/ant-design/pro-components/blob/76bf097aa5644045cc8ee5f3c36f6a228d469804/packages/layout/src/ProLayout.tsx#L920-L925

github-actions[bot] commented 9 months ago

当前 Issue 未检测到标题,请规范填写,谢谢!

The title of the current issue is not detected, please fill in according to the specifications, thank you!

MiniSuperDev commented 5 months ago

I see the same error, please reopen :)

zhengtan2003 commented 2 months ago

遇到相同问题了

xuyanzhuqing commented 1 month ago

一样