diff --git a/src/components/SimpleMenu/index.ts b/src/components/SimpleMenu/index.ts index 7c0301bd..c2957f99 100644 --- a/src/components/SimpleMenu/index.ts +++ b/src/components/SimpleMenu/index.ts @@ -1,2 +1 @@ export { default as SimpleMenu } from './src/SimpleMenu.vue' -export { default as SimpleMenuTag } from './src/SimpleMenuTag.vue' diff --git a/src/layouts/default/sider/MixSider.vue b/src/layouts/default/sider/MixSider.vue index d1ce065c..0e506c83 100644 --- a/src/layouts/default/sider/MixSider.vue +++ b/src/layouts/default/sider/MixSider.vue @@ -8,7 +8,7 @@ import LayoutTrigger from '../trigger/index.vue' import { useDragLine } from './useLayoutSider' import type { Menu } from '@/router/types' import { ScrollContainer } from '@/components/Container' -import { SimpleMenu, SimpleMenuTag } from '@/components/SimpleMenu' +import { SimpleMenu } from '@/components/SimpleMenu' import { Icon } from '@/components/Icon' import { AppLogo } from '@/components/Application' import { useMenuSetting } from '@/hooks/setting/useMenuSetting' @@ -20,6 +20,9 @@ import { useGo } from '@/hooks/web/usePage' import { SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH } from '@/enums/appEnum' import { getChildrenMenus, getCurrentParentPath, getShallowMenus } from '@/router/menus' import { listenerRouteChange } from '@/logics/mitt/routeChange' +import { createAsyncComponent } from '@/utils/factory/createAsyncComponent' + +const SimpleMenuTag = createAsyncComponent(() => import('/@/components/SimpleMenu/src/SimpleMenuTag.vue')) const wrap = ref(null) const menuModules = ref