Literal: invalid property: property value type check failed. Expected string, number, but got object.
Here is the error message
vue.runtime.esm.js?2b0e:601 [Vue warn]: Invalid prop: type check failed for prop “value”. Expected String, Number, got Object
—> & lt; ElInput> at packages/input/src/input.vue
& lt; ElFormItem> at packages/form/src/form-item.vue
& lt; ElCol>
& lt; ElRow>
& lt; ElForm> at packages/form/src/form.vue
& lt; ElDialog> at packages/dialog/src/component.vue
& lt; AccountBasicInfoList> at src/views/mdf/AccountBasicInfo.vue
& lt; App> at src/App.vue
& lt; Root>
Vue can’t accurately locate which attribute of the problem, so it can only judge by itself. This is how I judge.
1. Find the action corresponding to the error, that is, the function.
2. Then the debugger will see which line of code appears (I use alert, I feel that debugger and console.log are useless, because I can’t locate which line, maybe I won’t, I’m just a new one)
3. To find a variable, it must be that the variable receives the object when it receives the parameter value. The so-called object is not just a variable, it may be a list type. What I receive is the following
And then I define it like this
This will definitely report an error. You only need to write it in the place where you use the variable, such as the form or the input box Bianlangming. 1 or bianlangming. 2 get the value of 0 or – 1 instead of list, so no error will be reported. The names of the above defined variables have been changed, which has no effect on understanding.
All of them are the pits I met. I don’t feel that I have written them well. If I can understand them and help, please tell me something. Can CSDN praise them?If you can, it’s useless to like it, but the ending seems to follow the mainstream.
- Invalid prop: type check failed for prop value
- String null space error: binary operator expected
- Vue3’s use of reactive/torefs + V-model leads to the failure of response and the failure of El form input
- How to Solve Python TypeError: ‘list’ object is not callable
- CSRF verification failed. Request aborted [How to Solve]
- Tensorflow error due to uninitialized variable [How to Fix]
- [DOM] Input elements should have autocomplete attributes (suggested: autocomplete=’tel’, …
- [Solved] Open quote is expected for attribute “name” associ
- TypeError: list indices must be integers or slices, not str
- Several cases of error reporting in java.lang.nullpointerexception