解决vue中的Error in mounted hook: “TypeError: handler.call is not a function“
时间 2021-07-14
标签
案例
vue.js
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(){}