vue脚手架学习复盘
3.26问题
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
D:\webproject\vueTest\vue_test\src\components\School.vue
10:1 error Mixed spaces and tabs no-mixed-spaces-and-tabs
11:8 error Component name "School" should always be multi-word vue/multi-word-component-names
D:\webproject\vueTest\vue_test\src\components\Student.vue
10:8 error Component name "Student" should always be multi-word vue/multi-word-component-names
✖ 3 problems (3 errors, 0 warnings)
今天是脚手架的入门。跟学遇到两个错误,已解决
-
Mixed spaces and tabs
:混用tab
以及空格键,调节缩进即可 -
Component name "School" should always be multi-word vue/multi-word-component-names
:现在的版本不允许组件使用单个单词起名。在vue.config.js
文件中配置lintOnSave:false
即可const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: true, lintOnSave:false })
持续更(跟学尚硅谷教程)