Component name XXX should always be multi-word
一、出现报错
最近做一些小demo的时候出现一个错误
Component name “index” should always be multi-word
二、了解问题
给组件命名时没有使用驼峰命名法或横线拼接单词,编译的时候一直报错,实际上是语法检测的问
题,语法检查时将不规范的代码当成了错误。
注意:语法检查时要求组件名不能是单个单词,因此单个单词如 School 也会报错。
三、解决
在网上查了一查,很多的推荐就是在vue.config.js的文件下去关闭语法检查
module.exports = {lintOnSave: false, //关闭eslint检查
}
发现还是解决不了,后来才了解到需要把文件改成用 “-” 连接的名字命名才行,可能是平时用单个单
词命名久了,还是应该养成良好的命名习惯。
Component name XXX should always be multi-word相关推荐
- The Asset used by component in XXX scene “XXX.fire“ is missing. Detailed information:
刚才使用Cocos Creator出现的问题,已解决. The Asset used by component in XXX scene "XXX.fire" is missing ...
- Component name “xxx“ should always be multi-word. vue3项目eslint报错
前言 在vue3中当创建了一个demo.vue文件的时候,在文件中会提示Component name "demo" should always be multi-word如下图: ...
- vue使用vuetify创建项目运行报错:error Component name XXX should always be multi-word vue/multi-word-compon
报错如下: You may use special comments to disable some warnings. Use // eslint-disable-next-line to igno ...
- Invalid component name: “XXX“. Component names should conform to valid custom element name in html5
最近Vue项目中遇到种问题: 无效的组件名称:"提交订单". 组件名称应符合html5规范中的有效自定义元素名称. 于是定位->主要问题出现在组件命名上: export de ...
- error Component name “xxx“ should always be multi-word vue/multi-word-comp
一.Vue 3编译报错 error Component name "Login" should always be multi-word vue/multi-word-comp e ...
- 【小程序】警告: [Component] property xxx of xxx received type-uncompatible value解决办法
项目场景: 小程序 问题描述 在使用vant-weapp的DropdownMenu 下拉菜单组件时,点击组件后出现以下警告信息 [Component] property "icon" ...
- 关于微信小程序警告“Do not have handler in component: pages/xxx/xxx. “的解决方法
- 报错Unknown custom element <xxx> - did you register the component correctly的原因及解决办法
报错信息 components代码 导致出错的可能的原因 把components写成了component import xxx from "./xxx.vue" 写成了import ...
- POI根据模板导出word文件,以及word转PDF,PDF转图片再插入PDF中(防止PDF被修改)
POI操作word和PDF POI根据模板导出word文件 word转PDF PDF转图片再插入PDF中(防止PDF被修改) POI根据模板导出word文件 一.制作word模版,${xxxx}是一会 ...
最新文章
- 程序员的自我修养--链接、装载与库笔记:可执行文件的装载与进程
- react 调用 html5,React-Native Webview 和H5交互的两种方式
- mysql+phpMyAdmin错误解决:bug #4813 MySQL 5.7.6 and the Users menu tab
- Web server调研分析
- Java 程序 ——感想
- matlab最小二乘法_基于最小二乘法的线性回归拟合
- 9个元素换6次达到排序序列_面试题精选(排序算法类)c/c++版 上篇
- c++复习日记3 模板和流
- 收益管理系统(PROS)缘何在中国水土不服?
- audio语音播放组件
- java知识分享篇(八)
- 调用链根因定位论文《Ranking causal anomalies by modeling local propagations on networked systems》
- R 两组样本t检验 wilcoxon检验、卡方、fisher精确检验
- Delphi编程中流的使用
- 电子邮件服务器是硬盘上的,电子邮件的地址、账号和邮件服务器分别是什么?...
- 手游联运平台是什么?
- 杰理AC693N介绍
- oracle rac mpp,DB2 purescale vs Oracle RAC
- theano及cuda环境搭建
- IDEA设置标签多行展示