Invalid prop: type check failed for prop “value”. Expected String, Number, got Object found in

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  
found in

—> & 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.

Similar Posts: