update scss import

pull/8776/head
decade 2017-12-02 11:16:25 +08:00 committed by 杨奕
parent 0e478016be
commit ef7327753c
2 changed files with 4 additions and 4 deletions

View File

@ -14,9 +14,9 @@ The above website enables you to preview theme of a new theme color in real-time
$--color-primary: teal;
/* icon font path, required */
$--font-path: '../node_modules/element-ui/lib/theme-chalk/fonts';
$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import "../node_modules/element-ui/packages/theme-chalk/src/index";
@import "~element-ui/packages/theme-chalk/src/index";
```
Then in the entry file of your project, import this style file instead of Element's built CSS:

View File

@ -13,9 +13,9 @@ Element 的 theme-chalk 使用 SCSS 编写,如果你的项目也使用了 SCSS
$--color-primary: teal;
/* 改变 icon 字体路径变量,必需 */
$--font-path: '../node_modules/element-ui/lib/theme-chalk/fonts';
$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import "../node_modules/element-ui/packages/theme-chalk/src/index";
@import "~element-ui/packages/theme-chalk/src/index";
```
之后,在项目的入口文件中,直接引入以上样式文件即可(无需引入 Element 编译好的 CSS 文件):