element plus 替换主题为什么不生效
方法是参照 官方指南,但是不生效请问谁遇到过呢
1.我先建了一个reset.scss
$--colors: ("primary": ("base": rgb(24, 26, 24), ),
"success": ("base": #222522,
),
"warning": ("base": #a18878,
),
"danger": ("base": #413333,
),
"error": ("base": #e9dddd,
),
"info": ("base": #0b2027,
),
);
@forward "element-plus/theme-chalk/src/common/var.scss"with ($colors: $--colors,
$button-padding-horizontal: ("default": 50px));
2.在main中引入
import { createApp } from 'vue'import Cookies from 'js-cookie'
import '@/assets/styles/reset.scss'
import ElementPlus from 'element-plus'
import locale from 'element-plus/lib/locale/lang/zh-cn' // 中文语言
import '@/assets/styles/index.scss' // global css
...
...
以上是 element plus 替换主题为什么不生效 的全部内容, 来源链接: utcz.com/p/937433.html