vk-uview-ui组件配置报错:SassError: Undefined variable: “$u-type-primary-light“.

我在尝试使用uview时也出过类似的报错,但是没解决,可能是uview2不支持vue3的原因,于是我切换了vk-uview-ui组件,但是按照官网文档配置报以上错误。

解决方法:

我这里原因是路径错误引入失败,导致组件在使用全局变量时找不到,在uni.scss中正常引入即可。我是这样理解的,若有错误欢迎大佬指正

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
0:12:54.816 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js): 10:12:54.821 SassError: Undefined variable: "$u-type-primary". 10:12:54.821 on line 206 of D:\ideaWorkSpace\ehl-wx\node_modules\uview-ui\components\u-badge\u-badge.vue 10:12:54.826 >> background-color: $u-type-primary; 10:12:54.833 --------------------^ 10:12:54.839 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js): 10:12:54.844 SassError: Undefined variable: "$u-type-primary". 10:12:54.849 on line 309 of D:\ideaWorkSpace\ehl-wx\node_modules\uview-ui\components\u-checkbox\u-checkbox.vue 10:12:54.856 >> background-color: $u-type-primary; 10:12:54.860 ---------------------^ 10:12:54.865 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js): 10:12:54.871 SassError: Undefined variable: "$u-type-primary". 10:12:54.876 on line 350 of D:\ideaWorkSpace\ehl-wx\node_modules\uview-ui\components\u-icon\u-icon.vue 10:12:54.880 >> color: $u-type-primary; 10:12:54.885 ----------^ 10:12:54.889 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js): 10:12:54.894 SassError: Undefined variable: "$u-type-primary". 10:12:54.894 on line 432 of D:\ideaWorkSpace\ehl-wx\node_modules\uview-ui\components\u-button\u-button.vue 10:12:54.900 >> border-color: $u-type-primary; 10:12:54.905 ----------------^ 10:12:54.909 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js): 10:12:54.914 SassError: Undefined variable: "$u-type-primary". 10:12:54.919 on line 721 of D:\ideaWorkSpace\ehl-wx\node_modules\uview-ui\components\u-picker\u-picker.vue 10:12:54.925 >> color: $u-type-primary;解决
07-14
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值