Error in callback for watcher "$route": "TypeError: Cannot read property 'call' of undefined"
vue监听$route变化,报错:Error in callback for watcher "$route": "TypeError: Cannot read property 'call' of undefined"watch: {// 如果路由有变化,会再次执行该方法'$route': 'changeRoute'},解决方法检查changeRoute函
·
vue监听$route变化,报错:
Error in callback for watcher "$route": "TypeError: Cannot read property 'call' of undefined"
watch: {
// 如果路由有变化,会再次执行该方法
'$route': 'changeRoute'
},
解决方法
检查changeRoute函数是否在method下面
method: {
…
}
更多推荐
已为社区贡献5条内容
所有评论(0)