报错提示:
15:23:55.172 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js):
15:23:55.172 SassError: Undefined variable: "u-grid-item-border-right-color:u-border-color".
15:23:55.187 on line 37 of ../../../project/12.29/view/node_modules/uview-ui/libs/css/common.scss
15:23:55.202 from line 2 of ../../../project/12.29/view/node_modules/uview-ui/index.scss
15:23:55.202 from line 68 of E:\xjn\project\12.29\view\App.vue
15:23:55.202 >> border-color: u-content-color".
15:23:55.218 on line 244 of E:\xjn\project\12.29\view\node_modules\uview-ui\components\u-loading-icon\u-loading-icon.vue
15:23:55.218 >> u-content-color !default;
15:23:55.218 ---------------------------^
15:23:55.233 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js):
15:23:55.233 SassError: Undefined variable: "u-icon-primary: u-primary".
15:23:55.249 on line 245 of E:\xjn\project\12.29\view\node_modules\uview-ui\components\u-toast\u-toast.vue
15:23:55.249 >> u-primary !default;
15:23:55.249 ------------------------------^
解决办法:
在项目根目录的uni.scss中引入时,引用颜色scss
@import "uview-ui/theme.scss";
@import "uview-ui/index.scss";