0
点赞
收藏
分享

微信扫一扫

设置主机名和host映射

钵仔糕的波波仔 2023-06-07 阅读 54

本地修改,编译失效

参考自:Element UI 改变主题色_element ui修改主题色_猫子*的博客-CSDN博客

1、

Element - The world's most popular Vue UI framework

2、然后下载相应的主题包:style.zip

解压得到:fonts文件夹 和index.css
将这两个文件复制到
node_modules\element-ui\lib\theme-chalk 下替换原有的文件
之后重启服务器就可以更换主题色了。

全局生效

安装: npm i update-element-ui-theme

使用:在main.js 中:

import updateElementUiTheme from "update-element-ui-theme";

updateElementUiTheme({
  theme: "#222", // 要修改的主题色
  themeName: "--my-theme", // 要同步更新的 css 变量名称,这个可以不传
});
举报

相关推荐

0 条评论