Vue acquires data report error Cannot read property 'current' of undefined

when vue acquires data, the first five items are obtained normally, and the sixth item reports an error

.
Mar.16,2021

since the first five items are normal, there must be something different in section 6.
check the message in the res.data.data, error report and say that it is undefined


. You'd better use try/catch package for exception handling. It is recommended to print data analysis, and make it clear at a glance


let current = res.data.data.current;. It is res.data.data that does not have the attribute current. If undefined, is returned, an error will be reported.

Menu