轉載 https://blog.csdn.net/d295968572/article/details/80810349
當父組件 axjos 獲取數據,子組件使用 props 接收數據時,執行 mounted 的時候 axjos 還沒有返回數據,而且 mounted 只執行一次,這時 props 中接收的數據為空
解決方案:在對應組件中判斷數據的長度
轉載 https://blog.csdn.net/d295968572/article/details/80810349
當父組件 axjos 獲取數據,子組件使用 props 接收數據時,執行 mounted 的時候 axjos 還沒有返回數據,而且 mounted 只執行一次,這時 props 中接收的數據為空
解決方案:在對應組件中判斷數據的長度
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。