語法錯誤
"TypeError: Cannot read property 'resetFields' of undefined"
關鍵字前面的值變成了undefined
property or method "isCollapse" is not defined on the instance but referenced during render. Property or method "a" is not defined on the instance but referenced during render.
關鍵字在頁面中使用了,但是沒有在data或methods中定義, 使用的和定義的名字不一致
Module not found: Error: Can't resolve './views/User/index.vue'
當前的路徑錯誤,仔細核對路徑
<el-card> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
沒有注冊(導入該組件),或者導入注冊組件的名字和使用的名字不一致
在項目打包之后,項目運行不起來,路徑出了問題,通過下面方式解決
vue.config.js module.export = { publicPath: './' }
eslint常見錯誤
Too many blank lines at the end of file
結尾處換行超過1行
Newline required at end of file but not found
結尾處沒有新的換行
Missing space before value for key 'render'
丟失了空格在key的冒號后面
Strings must use singlequote
必須是單引號
Trailing spaces not allowed
當前行末尾處有多余的空格
Expected indentation of 8 spaces but found 10
當前行希望是前面有8個空格縮進但是有10個空格縮進
'Login' is defined but never used
定義了Login, 但是沒有使用到
F:\課程\課程項目\vue\admin_13\src\router\index.js 28:20 error 'Welcome' is not defined no-undef
在路由的js中出現這個錯誤,那么就是使用了這個組件,沒有定義導入進來,或者就是導入組件接收的名字和使用的時候不一致
More than 1 blank line not allowed
不允許換行超過1次, 只能有一行換行
Unexpected trailing comma
結尾處多了一個逗號
Extra semicolon
結尾處多了分號
Missing space before function parentheses
方法簡寫的()前面沒有空格
Missing space before opening brace