这个问题困扰我这个菜鸡很久了,当我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检查
})
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)