From 2198b982f0ebc7b1bb347e80ad7816a02325ad5e Mon Sep 17 00:00:00 2001 From: CHENZL Date: Fri, 14 Jun 2024 11:47:16 +0800 Subject: [PATCH] perf(project): Initializing the static routing function does not require asynchronization (#493) --- src/store/modules/route/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/modules/route/index.ts b/src/store/modules/route/index.ts index d49b756ba..a65a026a2 100644 --- a/src/store/modules/route/index.ts +++ b/src/store/modules/route/index.ts @@ -219,7 +219,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => { /** Init auth route */ async function initAuthRoute() { if (authRouteMode.value === 'static') { - await initStaticAuthRoute(); + initStaticAuthRoute(); } else { await initDynamicAuthRoute(); } @@ -228,7 +228,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => { } /** Init static auth route */ - async function initStaticAuthRoute() { + function initStaticAuthRoute() { const { authRoutes: staticAuthRoutes } = createStaticRoutes(); if (authStore.isStaticSuper) {