diff --git a/apps/web-antd/src/router/guard.ts b/apps/web-antd/src/router/guard.ts index e12766f9..a1ad6d88 100644 --- a/apps/web-antd/src/router/guard.ts +++ b/apps/web-antd/src/router/guard.ts @@ -18,7 +18,7 @@ function setupCommonGuard(router: Router) { // 记录已经加载的页面 const loadedPaths = new Set(); - router.beforeEach(async (to) => { + router.beforeEach((to) => { to.meta.loaded = loadedPaths.has(to.path); // 页面加载进度条 diff --git a/apps/web-ele/src/router/guard.ts b/apps/web-ele/src/router/guard.ts index e12766f9..a1ad6d88 100644 --- a/apps/web-ele/src/router/guard.ts +++ b/apps/web-ele/src/router/guard.ts @@ -18,7 +18,7 @@ function setupCommonGuard(router: Router) { // 记录已经加载的页面 const loadedPaths = new Set(); - router.beforeEach(async (to) => { + router.beforeEach((to) => { to.meta.loaded = loadedPaths.has(to.path); // 页面加载进度条 diff --git a/apps/web-naive/src/router/guard.ts b/apps/web-naive/src/router/guard.ts index 4810f13a..28d1cea7 100644 --- a/apps/web-naive/src/router/guard.ts +++ b/apps/web-naive/src/router/guard.ts @@ -18,7 +18,7 @@ function setupCommonGuard(router: Router) { // 记录已经加载的页面 const loadedPaths = new Set(); - router.beforeEach(async (to) => { + router.beforeEach((to) => { to.meta.loaded = loadedPaths.has(to.path); // 页面加载进度条 diff --git a/playground/src/router/guard.ts b/playground/src/router/guard.ts index 11ac9479..3bbe8dca 100644 --- a/playground/src/router/guard.ts +++ b/playground/src/router/guard.ts @@ -18,7 +18,7 @@ function setupCommonGuard(router: Router) { // 记录已经加载的页面 const loadedPaths = new Set(); - router.beforeEach(async (to) => { + router.beforeEach((to) => { to.meta.loaded = loadedPaths.has(to.path); // 页面加载进度条