@Watch('$route')
routechange(to: any, from: any) {
let routelink: string = to.path;
if (routelink === '/explorer') {
this['$router'].replace({path: '/electromagnetic'})//直接修改地址
this['$router'].replace({name: 'explorer'});//配置了路由
@Watch('$route')routechange(to: any, from: any) {let routelink: string = to.path;if (routelink === '/explorer') {this['$router'].replace({path: '/electromagnetic'})//直接修改地址this['$router']....
@Watch('$route')
routechange(to: any, from: any) {
let routelink: string = to.path;
if (routelink === '/explorer') {
this['$router'].replace({path: '/electromagnetic'})//直接修改地址
this['$router'].replace({name: 'explorer'});//配置了路由
转载于:https://www.cnblogs.com/yixiaoyang-/p/10942366.html
更多推荐
所有评论(0)