-
将项目从 umi3 升级到 umi4, 自定义 Antd4 主题失效了,有什么解决办法吗 ? export default defineConfig({ umi4 内置的 antd4, 但配置文件的样式配置都是针对 antd5 的 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
已经解决,配置中的 lessLoader 的 modifyVars 默认是 useConfig.theme,但我项目给这个变量设置了其他值,所以在Umi4设置Antd4主题需要下面这么配置
|
Beta Was this translation helpful? Give feedback.
已经解决,配置中的 lessLoader 的 modifyVars 默认是 useConfig.theme,但我项目给这个变量设置了其他值,所以在Umi4设置Antd4主题需要下面这么配置
lessLoader: { modifyVars: { ...antd4Theme, ...otherValue }, math: 'always' },