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

切换主题颜色无法对Button生效 #3251

Closed
3 tasks done
xiaoxx970 opened this issue Nov 7, 2023 · 7 comments
Closed
3 tasks done

切换主题颜色无法对Button生效 #3251

xiaoxx970 opened this issue Nov 7, 2023 · 7 comments
Labels
pr welcome Welcome developers to submit Pull Requests to the project

Comments

@xiaoxx970
Copy link

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Make sure the code is up to date. (Some bugs have been fixed in the latest code)
  • 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的颜色

image

Reproduction

src/App.vue 里把colorPrimary修改成 #00b96b(绿色)或其他任何颜色

colorPrimary: '#0960bd',

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

@DesignHhuang
Copy link

DesignHhuang commented Nov 8, 2023

@xiaoxx970 因为antd升级了主题系统,vben还是需要兼容之前的less,所以
image
这边还是需要相应的修改一下。

备注:如果需要大量自定义,可以按照项目设计需求修改design目录中的样式代码。
image

@xiaoxx970
Copy link
Author

@DesignHhuang 这样确实可以了,谢谢!以后会统一primaryColor的配置位置吗?现在有三个地方配置主题颜色的了:

themeColor: APP_PRESET_COLOR_LIST[0],

const primaryColor = '#0960bd';

colorPrimary: '#0960bd',

其中 projectSetting.ts 里的主题颜色看上去还是无用的

@wangjue666 wangjue666 added the pr welcome Welcome developers to submit Pull Requests to the project label Nov 9, 2023
@gnyuan
Copy link

gnyuan commented Nov 21, 2023

同类型的问题,菜单高亮处的颜色,无法配置或者设置。

@salmanLee
Copy link

兼容旧less部分的@primary-color有没有办法通过settingDrawer动态配置

@Free-QiF
Copy link

虽然button 可以使用了,但是其他的诸如菜单等,还是需要手动调整。想问问这个近期有修复计划么?

@2919807875
Copy link

同类型的问题,菜单高亮处的颜色,无法配置或者设置。

你有解决吗

@anncwb
Copy link
Collaborator

anncwb commented Jun 2, 2024

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

@anncwb anncwb added the Stale label Jun 2, 2024
@anncwb anncwb closed this as completed Jun 9, 2024
@vbenjs vbenjs locked and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr welcome Welcome developers to submit Pull Requests to the project
Projects
None yet
Development

No branches or pull requests

8 participants