perf: 登录逻辑调整

This commit is contained in:
rd
2025-09-11 12:04:54 +08:00
parent 44e1ea9a06
commit 7e6e086098
11 changed files with 103 additions and 104 deletions

View File

@ -8,6 +8,7 @@ import { useSidebarStore } from '@/stores/modules/side-bar';
import type { typeMenuItem } from './menu-list';
import { MENU_LIST } from './menu-list';
import { handleUserHome } from '@/utils/user';
import { useEnterpriseStore } from '@/stores/modules/enterprise';
import icon1 from '@/assets/img/agent/icon1.png';
@ -21,6 +22,7 @@ export default defineComponent({
const sidebarStore = useSidebarStore();
const appStore = useAppStore();
const userStore = useUserStore();
const enterpriseStore = useEnterpriseStore();
// const currentMenuList = ref<typeMenuItem[]>([]);
const currentMenuModInfo = ref<typeMenuItem>({});
@ -30,7 +32,7 @@ export default defineComponent({
const isHomeRoute = computed(() => currentRouteName.value === 'Home');
const showAiSearch = computed(() => !route.meta?.hideAiSearch);
const currentMenuList = computed(() => sidebarStore.currentMenuList);
const hasOpenEnterprise = computed(() => userStore.isOpenEnterprise);
const hasOpenEnterprise = computed(() => enterpriseStore.isOpenEnterprise);
const collapsed = computed(() => {
return sidebarStore.menuCollapse;