vue-vben-admin
vue-vben-admin copied to clipboard
切换主题颜色无法对Button生效
⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.
- [x] Read the docs.
- [x] Make sure the code is up to date. (Some bugs have been fixed in the latest code)
- [x] This is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
Describe the bug
在 src/App.vue 里把colorPrimary修改成 #00b96b(绿色)后没有效果,主题色没有改变。
实验发现对于按钮来说,hover的颜色确实变成了我设置的颜色(#00b96b),而其他组件比如Radio和Checkbox是能成功应用主题颜色的。
如图,截图的时候我鼠标放在了左上角“更改设置”上,它就是绿色的了,但是和预期不符,我要改的是显示的颜色不是hover的颜色
Reproduction
在 src/App.vue 里把colorPrimary修改成 #00b96b(绿色)或其他任何颜色
https://github.com/vbenjs/vue-vben-admin/blob/8ef39def79df43fb2529492dc4f09e73e25db015/src/App.vue#L28
System Info
- Operating System: MacOS 14.0
- Node version: 21.1.0
- Package manager (npm/yarn/pnpm) and version: pnpm 8.10.2
相关issue
#3250
@xiaoxx970 因为antd升级了主题系统,vben还是需要兼容之前的less,所以
这边还是需要相应的修改一下。
备注:如果需要大量自定义,可以按照项目设计需求修改design目录中的样式代码。
@DesignHhuang 这样确实可以了,谢谢!以后会统一primaryColor的配置位置吗?现在有三个地方配置主题颜色的了:
https://github.com/vbenjs/vue-vben-admin/blob/2142506ce5225dbe19118fcedb2cb48612c58fa7/src/settings/projectSetting.ts#L39
https://github.com/vbenjs/vue-vben-admin/blob/2142506ce5225dbe19118fcedb2cb48612c58fa7/internal/vite-config/src/utils/modifyVars.ts#L10
https://github.com/vbenjs/vue-vben-admin/blob/8ef39def79df43fb2529492dc4f09e73e25db015/src/App.vue#L28
其中 projectSetting.ts 里的主题颜色看上去还是无用的
同类型的问题,菜单高亮处的颜色,无法配置或者设置。
兼容旧less部分的@primary-color有没有办法通过settingDrawer动态配置
虽然button 可以使用了,但是其他的诸如菜单等,还是需要手动调整。想问问这个近期有修复计划么?
同类型的问题,菜单高亮处的颜色,无法配置或者设置。
你有解决吗
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days