【Error】vue报错:Component name “xxx“ should always be multi-word

在 vue.config.js 中关闭语法提示

const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  lintOnSave: false,	//关闭语法检查
})

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据你提供的引用内容,问题是关于Vue组件命名规则的误。根据\[1\]中的代码,可以看出误信息是"Component name 'Search' should always be multi-word",意思是组件名"Search"应该是多个单词。根据\[1\]中的配置,可以通过在.eslintrc.js文件中关闭命名规则来解决这个问题。具体的解决方法可以参考\[2\]和\[3\]中的代码示例,其中包括了两种解决方法。第一种是按照规范填写文件名,第二种是在vue.config.js文件中添加代码来关闭语法检查。你可以根据具体情况选择其中一种方法来解决这个问题。 #### 引用[.reference_title] - *1* [error Component name “index“ should always be multi-word vue/multi-word-component-names](https://blog.csdn.net/weixin_57167969/article/details/127750763)[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^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [error Component name “xxx“ should always be multi-word vue/multi-word-component-names](https://blog.csdn.net/m0_70619994/article/details/127931589)[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^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [ error Component name “xxx“ should always be multi-word vue/multi-word-component-names](https://blog.csdn.net/weixin_46713508/article/details/127693222)[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^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值