From cf08a6a034fa5ddd94b30137447ccd6ff4d9fc38 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 30 Dec 2025 10:15:57 +0800 Subject: [PATCH] fix: Resolve white screen on data source page refresh --- frontend/src/router/watch.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/router/watch.ts b/frontend/src/router/watch.ts index ff5276f0..c1aaf8fe 100644 --- a/frontend/src/router/watch.ts +++ b/frontend/src/router/watch.ts @@ -34,9 +34,15 @@ export const watchRouter = (router: Router) => { next('/login') return } + let isFirstDynamicPath = false if (!userStore.getUid) { await userStore.info() generateDynamicRouters(router) + isFirstDynamicPath = to?.path === '/ds/index' + if (isFirstDynamicPath) { + next({ ...to, replace: true }) + return + } } if (to.path === '/' || accessCrossPermission(to)) { next('/chat')