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(){}
Logo

基于 Vue 的企业级 UI 组件库和中后台系统解决方案,为数万开发者服务。

更多推荐