From 4e4b4bc2b728905d2a462b918b78c5c5e5bc6a25 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Thu, 12 Jun 2025 10:43:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A1=B6=E9=83=A8=E5=8F=B3=E4=BE=A7?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E7=A7=BB=E9=99=A4=E5=86=97=E4=BD=99=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E5=B0=81=E8=A3=85=E4=B8=BA=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/BasicLayout.vue | 36 ++- .../HeaderContentRight/HeaderContentRight.vue | 124 +++++++++ .../components/LockScreen.vue | 71 ++++++ .../components/NetCoreSelect.vue | 50 ++++ .../components/UserProfile.vue | 83 ++++++ src/layouts/components/RightContent.vue | 241 ------------------ src/store/modules/core.ts | 31 +++ src/store/modules/layout.ts | 4 +- 8 files changed, 376 insertions(+), 264 deletions(-) create mode 100644 src/layouts/components/HeaderContentRight/HeaderContentRight.vue create mode 100644 src/layouts/components/HeaderContentRight/components/LockScreen.vue create mode 100644 src/layouts/components/HeaderContentRight/components/NetCoreSelect.vue create mode 100644 src/layouts/components/HeaderContentRight/components/UserProfile.vue delete mode 100644 src/layouts/components/RightContent.vue create mode 100644 src/store/modules/core.ts diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index 0353d81b..3be38b2b 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -5,7 +5,7 @@ import { clearMenuItem, MenuDataItem, } from 'antdv-pro-layout'; -import RightContent from './components/RightContent.vue'; +import HeaderContentRight from './components/HeaderContentRight/HeaderContentRight.vue'; import Tabs from './components/Tabs.vue'; import GlobalMask from '@/components/GlobalMask/index.vue'; import ForcePasswdChange from '@/components/ForcePasswdChange/index.vue'; @@ -68,19 +68,6 @@ watch( ); // 动态路由添加到菜单面板 -// const rootRoute = router.getRoutes().find(r => r.name === 'Root'); -// if (rootRoute) { -// const children = routerStore.setRootRouterData(rootRoute.children); -// const buildRouterData = routerStore.buildRouterData; -// if (buildRouterData.length > 0) { -// rootRoute.children = children.concat(buildRouterData); -// } else { -// rootRoute.children = children; -// } -// } -// -// const { menuData } = getMenuData(clearMenuItem(router.getRoutes())); -// const menuData = computed(() => { const rootRoute = router.getRoutes().find(r => r.name === 'Root'); if (rootRoute) { @@ -151,10 +138,13 @@ tabsStore.clear(); // LOGO地址 const logoUrl = computed(() => { - let url = - appStore.logoType === 'brand' - ? parseUrlPath(appStore.filePathBrand) - : parseUrlPath(appStore.filePathIcon); + let url = parseUrlPath(appStore.filePathIcon); + if (appStore.logoType === 'brand') { + url = parseUrlPath(appStore.filePathBrand); + } + if (layoutState.collapsed) { + url = parseUrlPath(appStore.filePathIcon); + } if (url.indexOf('{language}') === -1) { return url; @@ -294,13 +284,17 @@ onUnmounted(() => { :alt="appStore.appName" :title="appStore.appName" /> -

+

{{ appStore.appName }}

-