赞
踩
src/element-variables.scss
$--color-primary: #FF9645 !default;
/* 改变 icon 字体路径变量,必需 */
$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import "~element-ui/packages/theme-chalk/src/index";
main.js
import Vue from 'vue'
import Element from 'element-ui'
import './element-variables.scss'
Vue.use(Element)
安装sass
npm install -D sass-loader@7.x
npm install node-sass@4.14.1
vue.config.js
module.exports = {
css: {
loaderOptions: {
sass: {
prependData: `@import "./src/element-variables.scss";`,
},
},
}
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。