【vue踩坑記錄】3、“Error in render: "TypeError: Cannot read property '0' of undefined"”渲染錯誤問題


參考:https://blog.csdn.net/edc3001/article/details/86833558

搭建項目商家詳情頭部時,能夠完整渲染出整體頭部界面無問題,但開發者工具仍然報出“Error in render: "TypeError: Cannot read property '0' of undefined”錯誤,具體如下

【解決過程】:

 

我的項目中遇到類似的問題

原先是

<span>{{ scope.row.Env[0].type }}</span>

修改后

<span v-if="scope.row.Env">{{ scope.row.Env[0].type }}</span>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM