赞
踩
vue3中修改element plus 主题色,有两种方式
:root {
–el-color-primary: red;
}
import ‘element-plus/dist/index.css’
import ‘@/styles/element-variables.scss’
文件夹 styles 下新建一个 element-variarbles.scss文件
@forward ‘element-plus/theme-chalk/src/common/var.scss’ with (
$colors: (
‘primary’: (
‘base’: red,
),
“success”: (
“base”: #67C23A,
),
),
);
@use “element-plus/theme-chalk/src/index.scss” as *; // 如果想要引入所有的样式
css: {
loaderOptions: {
sass: {
additionalData: @use “@/styles/element-variables.scss” as *;
},
},
},
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。