vscode-VueHelper icon indicating copy to clipboard operation
vscode-VueHelper copied to clipboard

关于组件内导航钩子的语法错误

Open lai397826696 opened this issue 8 years ago • 1 comments

输入beforeRouteEnter和beforeRouteLeave,得出 beforeRouteEnter((to, from, next) => { //does NOT have access to this component instance

}),语法报错,应该改成 beforeRouteEnter(to, from, next) { //does NOT have access to this component instance

}这样才对

lai397826696 avatar Jul 17 '17 04:07 lai397826696

这里不建议用箭头函数哇

lai397826696 avatar Jul 17 '17 04:07 lai397826696