解决vue的error Component name “School“ should always be multi-word vue/multi-word-component-names的问题

error Component name “School” should always be multi-word vue/multi-word-component-names

解决vue的error Component name “School“ should always be multi-word vue/multi-word-component-names的问题_第1张图片

1. 第一种解决办法

在vue.config.js中加入

lintOnSave:false

解决vue的error Component name “School“ should always be multi-word vue/multi-word-component-names的问题_第2张图片
再次重启Vue项目即可

第二种方法

将文件改名,最好改驼峰命名
例如:School改成MySchool
在这里插入图片描述
vue中的name属性要最好和文件名一样,改成Myschool
在这里插入图片描述
重启Vue项目即可

你可能感兴趣的:(vue.js,javascript,前端)