我是靠谱客的博主 虚心外套,最近开发中收集的这篇文章主要介绍vue报错:Component name “xxx“ should always be multi-word,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
这个问题困扰我这个菜鸡很久了,当我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 name “xxx“ should always be multi-word所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复