问题:
在一个正常使用的 uniapp 项目 添加一个空白 nvue 界面,报错,该nvue界面也打不开。
想请教下,这种情况如何处理,是否必须要把nvue 不支持的css处理掉才行吗?
//nvue 界面
<template>
<view>
<text>123</text>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad:function(){
console.log("test nvue")
},
methods: {
}
}
</script>
<style>
</style>
错误提示:
12:16:49.701 nvue中不支持如下css。如全局或公共样式受影响,建议将告警样式写在ifndef APP-PLUS-NVUE的条件编译中,详情如下:
12:16:49.714 WARNING: `-webkit-font-smoothing` is not a standard property name (may not be supported) at App.vue:52
12:16:49.720 WARNING: `-moz-osx-font-smoothing` is not a standard property name (may not be supported) at App.vue:53
12:16:49.728 WARNING: `content` is not a standard property name (may not be supported) at App.vue:56
12:16:49.729 WARNING: `content` is not a standard property name (may not be supported) at App.vue:59
12:16:49.734 WARNING: `content` is not a standard property name (may not be supported) at App.vue:62
12:16:49.739 WARNING: `content` is not a standard property name (may not be supported) at App.vue:65
12:16:49.968 ERROR: property value `` is not supported for `padding-right` (only number and pixel values are supported) at App.vue:440
12:16:49.975 ERROR: property value `` is not supported for `padding-left` (only number and pixel values are supported) at App.vue:440
12:16:49.982 ERROR: property value `` is not supported for `padding-right` (only number and pixel values are supported) at App.vue:494
12:16:49.989 ERROR: property value `` is not supported for `padding-left` (only number and pixel values are supported) at App.vue:494
12:16:50.680 ERROR: Selector `::-webkit-scrollbar` is not supported. Weex only support classname selector at App.vue:3419
12:16:50.687 WARNING: `display` is not a standard property name (may not be supported) at App.vue:3420
12:16:50.698 Module build failed (from ./node_modules/@dcloudio/vue-cli-plugin-hbuilderx/packages/webpack-uni-nvue-loader/lib/style.js):
12:16:50.699 TypeError: Cannot read property '1' of null
12:16:50.708 at transition (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\lib\shorthand-parser.js:24:8)
12:16:50.708 at declarations.reduce (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\lib\shorthand-parser.js:201:28)
12:16:50.717 at Array.reduce (<anonymous>)
12:16:50.726 at module.exports (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\lib\shorthand-parser.js:198:23)
12:16:50.726 at E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\index.js:87:31
12:16:50.735 at Array.forEach (<anonymous>)
12:16:50.735 at Object.parse (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\weex-styler\index.js:80:26)
12:16:50.742 at genStyleString (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-uni-nvue-loader\lib\style.js:36:10)
12:16:50.742 at Object.module.exports (E:\HBuilderX\plugins\uniapp-cli\node_modules\@dcloudio\vue-cli-plugin-hbuilderx\packages\webpack-uni-nvue-loader\lib\style.js:8:45)
12:16:50.750 DONE Build complete. Watching for changes...
12:16:50.751 项目 'app_uni' 编译成功。
12:16:50.758 WARNING: Module Warning (from ./node_modules/postcss-loader/src/index.js):
12:16:50.766 Warning
12:16:50.826 (87:2) start value has mixed support, consider using flex-start instead
12:16:50.835 ERROR Build failed with errors.
2 个回复
randy重名了 (作者)
我把其他样式删了,出现了这个
小周爱学习
我的bug,我在vue页面中的style添加了一个lang=scss就解决了
randy重名了 (作者)
谢谢,用你的办法可行。他们官方的模板有问题也不处理下。
2021-11-12 12:19