问题描述

Vue脚手架运行的报错
error Component name “Union” should always be multi-word vue/multi-word-component-names

You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
ERROR in
E:\前端\test\src\components\Union.vue
  11:14  error  Component name "Union" should always be multi-word  vue/multi-word-component-names

E:\前端\test\src\components\union.vue
  11:14  error  Component name "union" should always be multi-word  vue/multi-word-component-names

✖ 2 problems (2 errors, 0 warnings)


webpack compiled with 1 error

原因不明


解决方案:

把组件名改成双驼峰命名,单独一个union是不行的,我改成了UnionMsg
最后记得要用ctrl c快捷键在控制台关闭脚手架后
再重新跑一次 nmp run serve,如此脚手架才能更新文件的重命名。

Logo

前往低代码交流专区

更多推荐