TypeError: Cannot read property 'xxxx' of undefined的解決方法

在vue或者js中,使用.length的時候在瀏覽器的控制檯中常常會報TypeError: Cannot read property 'length' of undefined的錯誤,相似的錯誤還有不少,大多都是TypeError: Cannot read property 'xxx' of undefined,出現這種錯誤的緣由很簡單,就是你調用該方法或函數的字符串或數組、對象等等出現了爲空的狀
相關文章
相關標籤/搜索