Invalid prop:type check failed for prop.Expected String with value“[object Object]”got Object

  • Error translation:

 Invalid prop:type check failed for prop.Expected String with value“[object Object]”got Object

——Invalid prop: prop that failed type check . The expected value is a string value, and the obtained "[object object]" is in the form of an object

  • problem found:

Through this translation, we can find that the error reported is a type error, which means that we passed the wrong data type when passing the value. 

  •  Check the components and find the problem

 The component indicates that the type passed is a string type, but what I passed is an object, thus reporting an error.

  • Solve the problem

 Just write the style as a string and pass it as a parameter

Guess you like

Origin blog.csdn.net/qq_45796592/article/details/131870831