when I was working on a company project, a piece of data came from the background: [{. }]
I take it for granted that it is an array, then assign it to an empty array aprData, and pass aprData to the subcomponents, and specify type checking in the subcomponents:
props: {
aprData:[],
}
and then something amazing happens, and the console says:
errorHandler: I**nvalid prop: type check failed for prop "aprData". Expected , got Array
so I hastened to check the data type:
console.log("aprData:",Object.prototype.toString.call(this.aprData));
result: aprData type: [object Array]
so I am completely confused. What went wrong?