perf(project): Initializing the static routing function does not require asynchronization

This commit is contained in:
chenzhaolong 2024-06-14 11:34:31 +08:00
parent c212565248
commit ac7432c3d9

View File

@ -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) {