标题报错信息
Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.
More info: https://sass-lang.com/d/mixed-decls
╷
86 │ ┌ .isCheck {
87 │ │ color: #FFFFFF;
88 │ │ background: #0094E7;
89 │ │ }
│ └─── nested rule
... │
91 │ text-align: center;
│ ^^^^^^^^^^^^^^^^^^ declaration
╵
src\views\index\index.vue 91:3 root stylesheet
原因:
sass官网有具体的说明:https://sass-lang.com/documentation/breaking-changes/mixed-decls/
解决方法:
将父级的样式代码写到最前面
现在的代码:
修改后的代码:
结果:至此就不报错了