1:1 error Component name “Subtraction“ should always be multi-word vue/multi-word-component-name

错误产生环境

Vue 脚手架构建项目时,导入自定义组件产生

错误描述

 1:1  error  Component name "Subtraction" should always be multi-word  vue/multi-word-component-names

在这里插入图片描述

错误原因

语法检查的时候把不规范的代码(即命名不规范)当成了错误

解决办法

解决办法1:修改组件名称

解决办法2:在vue.config.js 中添加如下配置 lintOnSave: false

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

猜你喜欢

转载自blog.csdn.net/qq_42025798/article/details/124349242