mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-02-02 18:08:40 +08:00
fix(perm-guard): Fix the problem that the routing query is lost after refreshing the page (#941)
This commit is contained in:
parent
59cf860564
commit
9c4889f085
@ -88,7 +88,8 @@ export function createPermissionGuard(router: Router) {
|
||||
|
||||
if (to.name === PAGE_NOT_FOUND_ROUTE.name) {
|
||||
// 动态添加路由后,此处应当重定向到fullPath,否则会加载404页面内容
|
||||
next({ path: to.fullPath, replace: true });
|
||||
// fix: 添加query以免丢失
|
||||
next({ path: to.fullPath, replace: true, query: to.query });
|
||||
} else {
|
||||
const redirectPath = (from.query.redirect || to.path) as string;
|
||||
const redirect = decodeURIComponent(redirectPath);
|
||||
|
Loading…
Reference in New Issue
Block a user