vue watch中function用箭头函数时this不指向vue

问题:web watch:{ $route:(to,from)=>{ // this.title 为undefined } } 解决:换回正常函数svg watch:{ $route:funciton(to,from){ //this 指向Vue } }
相关文章
相关标签/搜索