From 6e0560f69d03e818be17c0c47629cde64443bdfe Mon Sep 17 00:00:00 2001 From: Suxue Date: Tue, 21 May 2024 10:33:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(Router):=20=E8=B7=AF=E7=94=B1=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E6=90=BA=E5=B8=A6=E5=8F=82=E6=95=B0=20(#720)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: suxue --- src/permission.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/permission.ts b/src/permission.ts index ab7b7d3..0879f75 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -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; } }