From a2fd2b0e750888fa01a4f083e2241e7c11f59f72 Mon Sep 17 00:00:00 2001 From: ray <1490493387@qq.com> Date: Wed, 30 Oct 2024 00:32:50 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20:recycle:=20=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=A0=8F=E7=BB=84=E4=BB=B6=E4=BB=A3=E7=A0=81=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Fullscreen/index.vue | 11 ++ src/components/Hamburger/index.vue | 5 +- src/components/SizeSelect/index.vue | 41 ++--- .../NavBar/components/NavbarAction.vue | 143 ------------------ .../NavBar/components/NavbarRight.vue | 81 ++++++++++ .../NavBar/components/Notification.vue} | 0 .../NavBar/components/UserProfile.vue | 74 +++++++++ src/layout/components/NavBar/index.vue | 29 ++-- src/layout/components/Sidebar/index.vue | 23 ++- src/layout/index.vue | 2 +- 10 files changed, 227 insertions(+), 182 deletions(-) create mode 100644 src/components/Fullscreen/index.vue delete mode 100644 src/layout/components/NavBar/components/NavbarAction.vue create mode 100644 src/layout/components/NavBar/components/NavbarRight.vue rename src/{components/Notice/index.vue => layout/components/NavBar/components/Notification.vue} (100%) create mode 100644 src/layout/components/NavBar/components/UserProfile.vue diff --git a/src/components/Fullscreen/index.vue b/src/components/Fullscreen/index.vue new file mode 100644 index 00000000..bd85b4b4 --- /dev/null +++ b/src/components/Fullscreen/index.vue @@ -0,0 +1,11 @@ + + + + + diff --git a/src/components/Hamburger/index.vue b/src/components/Hamburger/index.vue index 6ab2eb6d..c43073a2 100644 --- a/src/components/Hamburger/index.vue +++ b/src/components/Hamburger/index.vue @@ -1,15 +1,16 @@ + + - diff --git a/src/layout/components/NavBar/components/NavbarRight.vue b/src/layout/components/NavBar/components/NavbarRight.vue new file mode 100644 index 00000000..1b0ef528 --- /dev/null +++ b/src/layout/components/NavBar/components/NavbarRight.vue @@ -0,0 +1,81 @@ + + + + diff --git a/src/components/Notice/index.vue b/src/layout/components/NavBar/components/Notification.vue similarity index 100% rename from src/components/Notice/index.vue rename to src/layout/components/NavBar/components/Notification.vue diff --git a/src/layout/components/NavBar/components/UserProfile.vue b/src/layout/components/NavBar/components/UserProfile.vue new file mode 100644 index 00000000..ccf8911b --- /dev/null +++ b/src/layout/components/NavBar/components/UserProfile.vue @@ -0,0 +1,74 @@ + + + + + diff --git a/src/layout/components/NavBar/index.vue b/src/layout/components/NavBar/index.vue index c985c0b9..9e8c61a5 100644 --- a/src/layout/components/NavBar/index.vue +++ b/src/layout/components/NavBar/index.vue @@ -1,15 +1,13 @@ @@ -18,16 +16,25 @@ import { useAppStore } from "@/store"; const appStore = useAppStore(); +// 侧边栏是否打开 +const isSidebarOpened = computed(() => appStore.sidebar.opened); + +// 展开/收缩菜单 function toggleSideBar() { appStore.toggleSidebar(); } diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 67a3df09..cb3d90a4 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -1,25 +1,28 @@