首页加载顺序问题

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