Component name "Other" should always be multi-word vue/multi-word-component-nam

16 阅读1分钟

image.png原因是在组件命名的时候未按照 ESLint 的官方代码规范进行命名。 解决方法: 配置 .eslintrc.js文件
关闭命名规则

module.exports = {

  rules: {

    // 关闭名称校验

    "vue/multi-word-component-names": "off",

  },

};

关闭之后还是会有错误 解决方案:
修改组件名为多个单词,使用大驼峰命名方式或者用“-”连接单词

image.png 将命名改成驼峰命名规则就行了

image.png