Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js):
15:21:39.872 SassError: Undefined variable: "$u-primary".
15:21:39.878 on line 203 of C:\Users\Administrator\Desktop\yslt\uni_modules\uview-ui\components\u-icon\u-icon.vue
15:21:39.878 >> $u-icon-primary: $u-primary !default;
15:21:39.886 -----------------^
1***@qq.com
- 发布:2023-03-07 15:25
- 更新:2023-04-20 22:19
- 阅读:574
2 个回复
9***@qq.com
看官方文档 导入了还需要在main.js里面安装配置
k***@126.com
uni.scss文件修改(2.x官方文档上没有说明,参见1.x官方文档,除2.x官方文档配置外,uni.scss文件添加上下面的内容,解决和你一样的问题)
完整的uni.scss文件内容:
@import '@/uni_modules/uni-scss/variables.scss';
//uView自定义的css类名和scss变量,均以" u- "开头
@import '@/uni_modules/uview-ui/theme.scss';