Common mistakes in Vue that you have to understand all night

Compiled with problems:

compilation problem

C:\myel\src\views\HomeView.vue

error occurred file

3:1 error Mixed spaces and tabs no-mixed-spaces-and-tabs

4:1 error Mixed spaces and tabs no-mixed-spaces-and-tabs

first character of line 3

first character of letter 4

Mixed spaces and tabs

Reason for error: mixed spaces and tabs

no-mixed-spaces-and-tabs

Error rule: no-mixed-spaces-and-tabs Do not mix spaces and tabs

2 problems (2 errors, 0 warnings)

2 issues (2 errors, 0 warnings)

Compiled with problems:

Compile Error

ERROR in ./src/views/HomeView.vue?

where the error occurred

Unexpected keyword 'const'. (6:0)

There is a keyword const that should not appear in the 0th character of line 6

63 | const user = reactive({ userid: "", pwd: "", code: "" }), | ^ 64 | const rules = reactive({ | ^ 65 | userid: [

There is an error between the two ^ on lines 63 to 64

ERROR in ./src/router/index.ts 10:19-57

The error occurs in ./src/router/index.ts line 10, characters 19 to 57

Module not found: Error: Can't resolve '../views/admin/AdminVeiw.vue' in 'C:\myel\src\router'

, if the module cannot be found, it cannot resolve (cash, find, resolve)../views/admin/AdminVeiw.vue

in C:\myel\src\router

Summary: file ../views/admin/AdminVeiw.vue (error occurred in file name/path)

ERROR in ./src/views/HomeView.vue

The error occurs at HomeView.vue

VueCompilerError: Element is missing end tag.

tag has no closing tag

2 | <div class="login">

| ^

div on the second row

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id')

Uncaught (promise) TypeError: cannot read property of undefined (read id)

beforecreate create before

created created

mounted mounted (display rendering dom node)

<h1>{ {joks[0].summary}}</h1>

joks is empty by default

TypeError: Cannot read properties of undefined (reading 'summary')

Cannot read the summary attribute on undefined

getJok get data

trigger update

updated Update the page (with data, the updated data is displayed)

The [] subscript appears. Use v-if for attributes (do not render for the first time, wait for the update and then render)

Uncaught (in promise) TypeError: state.goods.forEach is not a function

No forEach for state.goods.forEach (goods is not an array)

index.js

C:\youmi\src\views\AboutView.vue

wrong file address

16:17 error 'reactive' is not defined no-undef

Line 16, 17 characters error reactive is not defined

App.vue error 30

[vuex] unknown mutation type: changeA

vuex cannot find a mutation called changeA

An error occurred in AboutView

VueCompilerError: Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).

Vue compilation error: attribute name cannot contain "'<

at C:\youmi\src\views\AboutView.vue:8:2

line 8

const cannot be reassigned

check is defined without standby call

······EHD.

Guess you like

Origin blog.csdn.net/qq_60633836/article/details/123699682