Closed hungtcs closed 9 months ago
在全局 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
当前 Issue 未检测到标题,请规范填写,谢谢!
The title of the current issue is not detected, please fill in according to the specifications, thank you!
I see the same error, please reopen :)
遇到相同问题了
一样
🐛 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