vue中 Error in mounted hook: "TypeError: handler.call is not a function" 报错问题解决方案

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