我在文件中声明这样的扩展
button.module.scss
.button {
@extend %button;
}
然后尝试在文件中使用它
icon.module.scss
.icon {
%button & {
fill: red;
}
}
我尝试将 scss 模块
button.module.scss
导入到文件 icon.module.scss
中,如下所示:
@import '../../components/UI/button/button.module.scss'
这个方法没有报错,但是没有解决我的问题