Skip to content

使用scss自定义主题,运行或打包后不重复样式(demo)

Notifications You must be signed in to change notification settings

zhuxiwen/elementui-scss-theme-no-repeat

Repository files navigation

elementui-scss-theme-no-repeat

参考的 https://www.jianshu.com/p/904b36676304 的配置

不过上面的文章中的ext配置应该和libraryName、styleLibrary同级

这个自定义主题的demo(vue cli项目)仅参考。

主要做了下面几个配置

1、配置babel.config.js

2、全局scss

3、自定义主题

结尾

开发环境中,有时候你可能会发现用了上面方式还是有重复的现象。
拿.el-button--primary举例,它是el-button组件的样式。不过在 dropdown.scss 中也引用了它的样式,还是会有重复的问题不过仅在开发环境。

About

使用scss自定义主题,运行或打包后不重复样式(demo)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published