From de2fa24bf587c2bf43a32a9b25c383e06c36c3b6 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Sun, 19 May 2024 16:31:45 +0800 Subject: [PATCH] fix: route resolve error --- packages/client/src/router/createVueRouter.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/src/router/createVueRouter.ts b/packages/client/src/router/createVueRouter.ts index 32b211749c..475cca99ba 100644 --- a/packages/client/src/router/createVueRouter.ts +++ b/packages/client/src/router/createVueRouter.ts @@ -40,7 +40,8 @@ export const createVueRouter = (): Router => { // and save page data to route meta router.beforeResolve(async (to, from): Promise => { if (to.path !== from.path || from === START_LOCATION) { - const fullPath = to.fullPath.split('#')[0] + console.log(to) + const fullPath = to.fullPath.split(/#|\?/)[0] const route = resolveRoute(fullPath) if (route.path !== fullPath) {