这个问题困扰我这个菜鸡很久了,当我run serve的时候总是会报错Component name “xxx” should always be multi-word。
一直以为是命名的问题,可是改了又改还是不行,虽然知道肯定不是名字的问题。
INFO
Starting development server...
ERROR
Failed to compile with 1 error
13:23:50
/Users/mac/Desktop/mus/test1/src/components/Box.vue
1:1
error
Component name "Box" should always be multi-word
vue/multi-word-component-names
✖ 1 problem (1 error, 0 warnings)
原因:语法提示的锅
解决:
在 vue.config.js 中关闭语法提示
具体做法:
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false, //关闭eslint检查
})
最后
以上就是虚心外套最近收集整理的关于vue报错:Component name “xxx“ should always be multi-word的全部内容,更多相关vue报错:Component内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复