解决vue中的Error in mounted hook: “TypeError: handler.call is not a function“

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