mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-22 16:36:32 +08:00
feat(Router): 路由跳转携带参数 (#720)
Co-authored-by: suxue <admin@moyiyang.cn>
This commit is contained in:
parent
0aa81be9a6
commit
6e0560f69d
|
@ -39,7 +39,7 @@ router.beforeEach(async (to, from, next) => {
|
|||
next({ path: to.fullPath, replace: true, query: to.query });
|
||||
} else {
|
||||
const redirect = decodeURIComponent((from.query.redirect || to.path) as string);
|
||||
next(to.path === redirect ? { ...to, replace: true } : { path: redirect });
|
||||
next(to.path === redirect ? { ...to, replace: true } : { path: redirect, query: to.query });
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user