vue 路由跳转到本页面,ts 监听路由变化

@Watch('$route')
routechange(to: any, from: any) {
//参数不相等
    if (to.query.name!=from.query.name) {

//todo

    }
}

 

posted @ 2019-09-26 19:29  Cassie、  阅读(6487)  评论(0编辑  收藏  举报