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

打包部署后主题色theme切换不生效,还是使用初始配置的主题色 #2087

Closed
codefarming opened this issue Jul 17, 2022 · 5 comments

Comments

@codefarming
Copy link

image
官方网站中主题色切换也是无效的,看了之前别人提过的issues是因为vite版本2.5.10之后打包时生成app-theme-style.css为空导致的,本人当前使用的vite版本为2.6.13,现在有什么办法可以解决这个问题?

@dapeng0201
Copy link

同, 我也遇到了这个问题,本地vite运行可以。本地打包preview切换就没效果了

@dapeng0201
Copy link

解决方案:
https://gitee.com/thinkgem/jeesite-vue/blob/8cddc3e006cf5992db9aaf2cdfeae9d62a13b708/build/vite/plugin/theme.ts#
这个文件覆盖你项目同路径文件, 我试过了可以实现切换,不用切换vite版本

@codefarming
Copy link
Author

用你的方法试了,有效果可以正常切换主题色了

@yeyeye7
Copy link

yeyeye7 commented Nov 10, 2022

为什么我的isBuild是false

yeyuchen198 referenced this issue Mar 24, 2023
* feat(axiosSuccess): 操作成功后根据传入提示模式进行相应

* fix(axiosRetry): 解决get重试请求返回的headers造成无法成功请求的问题

* fix(axiosRetry): 参数首字母小写

* fix(useDataSource): 解决deleteTableRecord删除树形表格的行记录时,无法删除,无法找到子节点的问题

* feat(useDataSource): 删除之前提交代码遗留的console

* fix(permissionGuard): 当获取用户信息失败时,不允许正常登陆返回登陆界面

* fix(permissionGuard): 代码还原

* fix(menu): 解决隐藏菜单目录只能隐藏第一层目录的问题,递归隐藏所有子菜单

* feat(baseSetting): 个人设置图标修改时弹出窗显示原图片,由于跨域获取图片存在问题暂时将user.ts中的跨域图片链接去掉,直接采用本地图片

* fix(ApiSelect): 解决参数类型为string时的警告问题

* fix(SettingFooter): 解决主题重置后Theme不实时更新问题
@Yuliang-Lee
Copy link
Contributor

针对 vite-plugin-theme 的问题修复发了新的包,使用新的包在初始化 viteThemePlugin 时传入 isProd: true 即可解决问题
https://www.npmjs.com/package/@xlaoyu/vite-plugin-theme

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

No branches or pull requests

4 participants