Vue error TypeError: Cannot read property 'length' of undefined?


vue editors report such an error without jumping while loading it all the time.

Mar.04,2021

that depends on where your code writes a variable .length of undefined.


should be a for loop or something like arr.length is written in the judgment, but arr means undefined, to see if it doesn't get a value. The meaning of


is that there is no definition. If you don't see what your code has written, it may be because you obtained the data asynchronously, and there is a problem with the execution time


if the page rendering is normal, the data (array) has not been requested yet. For example, if an array for loop is nested under an array for loop in the html template, this phenomenon will occur. You can solve

by adding a vmuriff = "data.length! = = 0" to the first loop of the template.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eac02b-20a0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eac02b-20a0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?