首页加载顺序问题

This commit is contained in:
lai
2024-10-17 17:30:11 +08:00
parent 7b60c30548
commit d257151718

View File

@@ -10,12 +10,9 @@ import {
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useUserStore from '@/store/modules/user'; import useUserStore from '@/store/modules/user';
import useLayoutStore from '@/store/modules/layout'; import useLayoutStore from '@/store/modules/layout';
import useRouterStore from '@/store/modules/router';
const currentComponent = shallowRef<Component | null>( const routerStore = useRouterStore();
defineAsyncComponent( const currentComponent = shallowRef<Component | null>(null);
() => import('@/views/configManage/neOverview/index.vue')
)
);
/**匹配views里面所有的.vue或.tsx文件 */ /**匹配views里面所有的.vue或.tsx文件 */
const views = import.meta.glob('../views/**/*.{vue,tsx}') as Record< const views = import.meta.glob('../views/**/*.{vue,tsx}') as Record<
@@ -39,7 +36,7 @@ function findView(dirName: string): () => Promise<Component> {
return views[dir]; return views[dir];
} }
} }
return () => import('@/views/error/404.vue'); return () => import('@/views/configManage/neOverview/index.vue');
} }
onMounted(() => { onMounted(() => {