赞
踩
mian.js 里面
import './styles/element/index.scss'
// styles/element/index.scss 代码
- // 修改element主题样式
- @forward 'element-plus/theme-chalk/src/common/var.scss' with (
- $colors: (
- 'primary': (
- 'base': #e54c0f,
- ),
- ),
- $button-padding-horizontal: ("default": 50px)
- );
- // 自定义暗黑主题变量
- @use "./dark.scss";
- // 导入element样式
- @use "element-plus/theme-chalk/src/index.scss" as *;
- //导入黑色主题
- @use "element-plus/theme-chalk/src/dark/css-vars.scss" as *;
dark.scss里面代码
- // 自定义黑色主题
- $--colors: (
- "primary": (
- "base": #589ef8,
- ),
- );
- @forward "element-plus/theme-chalk/src/dark/var.scss" with (
- $colors: $--colors
- );
参考:element-plus-vite-starter-main 项目
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。