【Vue Error】 error Component name “product“ should always be multi-word vue/multi-word-compone……

【Vue Error】 error Component name “product” should always be multi-word vue/multi-word-compone……

The error is as follows:
insert image description here
Analysis problem:

It can be seen from the translation that there is a problem with the component name, which means that the component name should be composed of multiple words spliced ​​​​with horizontal lines.

After consulting the data, it is found that this is actually when the syntax check is performed, the non-standard code (that is, the naming is not standard) is regarded as an error.

Solve the problem:

Modify configuration items, turn off syntax checking

The root directory of the project finds vue.config.jsthe file
insert image description here

Add configuration: lintOnSave:false, the effect is to turn off syntax checking

insert image description here

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

Save and run the project to solve it successfully.

Guess you like

Origin blog.csdn.net/m0_46374969/article/details/131920568