一 配置sass-loader
sass-loader 版本过高,使用下面配置
yarn add sass-loader@^7.1.0 -D
二. scss失效
- 在scoped内会让scss(多级嵌套)失效,需在嵌套项加入
/deep/
.login-form { border-radius: 6px; background: #ffffff; width: 385px; padding: 25px 25px 5px 25px; .el-input { height: 38px; /deep/ input { // 注意在scoped内会让scss(多级嵌套)失效 height: 38px; } } .input-icon { height: 39px; width: 14px; margin-left: 2px; } }