error Component name "hednav" should always be multi-word vue/multi-word-component-names
时间: 2023-12-05 09:49:43 浏览: 186
在你提供的引用中,可以看到有关组件名称的报错信息。该报错指出组件名称"hednav"应该始终是多个单词,并与其他组件名称保持一致。这是因为Vue官方文档建议使用驼峰式或连字符来命名组件,以提高代码的可读性和一致性。如果你的组件名称不符合这些要求,编译过程中就会被判定为不规范并报错。为了解决这个问题,你可以在项目根目录下的vue.config.js文件中添加以下代码:
const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false
})
以上代码中的lintOnSave配置可以禁用ESLint的保存时检查,这样就不会再报错了。请确保在修改配置文件时注意语法和格式的正确性。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [error Component name “Login“ should always be multi-word vue/multi-word-component-names【已解决】](https://blog.csdn.net/qq_40374604/article/details/128785667)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [error Component name “index“ should always be multi-word vue/multi-word-component-names](https://blog.csdn.net/weixin_43945122/article/details/129670018)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文