vue中 Error in mounted hook: "TypeError: handler.call is not a function" 報錯問題解決方案

進入組件頁面時,vue報錯:Error in mounted hook: "TypeError: handler.call is not a function", 主要原因是裏面的鉤子函數mounted  {}是否有聲明瞭未定義方法或是隻聲名了鉤子函數 解決該問題的方法: 1.把mounted: {}刪除掉。 2.把mounted: {}改爲mounted(){}。
相關文章
相關標籤/搜索