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

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

//todo

    }
}
原文地址:https://www.cnblogs.com/qiufang/p/11593865.html