Skip to content
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

[Question] 在@ant-design-vue/pro-layout 3.x中如何动态切换主题色 #260

Open
andrewgreat opened this issue Dec 12, 2022 · 2 comments
Labels
question Further information is requested

Comments

@andrewgreat
Copy link

andrewgreat commented Dec 12, 2022

使用版本:"@ant-design-vue/pro-layout": "^3.2.3"
主要环境:vue3+vite2+ant-design-vue3
全局引入css样式:
import '@ant-design-vue/pro-layout/dist/style.css'
import 'ant-design-vue/dist/antd.variable.min.css'
执行切换主题方法不切换主题颜色:
ConfigProvider.config({
theme: {
primaryColor: color,
},
});
请教一下用pro-layout布局如何动态切换主题。

@andrewgreat andrewgreat added the question Further information is requested label Dec 12, 2022
@luocong2016
Copy link

同问

@luocong2016
Copy link

luocong2016 commented Feb 14, 2023

// 这里引入 less 绝对是覆盖不了的
@import url('@ant-design-vue/pro-layout/dist/style.css');
@import url("ant-design-vue/dist/antd.variable.less");

但是引入 antd.dark.less 主题切换就变得非常复杂 而且经常不对

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants