From 57e0e610369a91b85a21e0caca9c8b3aadecf909 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 11 Oct 2024 18:15:32 +0800 Subject: [PATCH] 1 --- src/layout/SiderbarLayout.vue | 97 +++++++ src/layout/components/Navbar/Item.vue | 28 ++- src/layout/components/Navbar/index.vue | 4 +- src/layout/components/Sidebar/Item.vue | 8 +- src/layout/components/Sidebar/index.vue | 13 +- src/store/modules/permission.js | 8 +- src/styles/index.scss | 1 - src/styles/navbar.scss | 60 ++++- src/styles/sidebar-variables.scss | 27 ++ src/styles/sidebar.scss | 320 ++++++++++++++++++++---- src/styles/variables.scss | 4 +- 11 files changed, 489 insertions(+), 81 deletions(-) create mode 100644 src/layout/SiderbarLayout.vue create mode 100644 src/styles/sidebar-variables.scss diff --git a/src/layout/SiderbarLayout.vue b/src/layout/SiderbarLayout.vue new file mode 100644 index 0000000..e351b15 --- /dev/null +++ b/src/layout/SiderbarLayout.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/src/layout/components/Navbar/Item.vue b/src/layout/components/Navbar/Item.vue index 7727f0d..dc93d50 100644 --- a/src/layout/components/Navbar/Item.vue +++ b/src/layout/components/Navbar/Item.vue @@ -12,19 +12,25 @@ diff --git a/src/layout/components/Navbar/index.vue b/src/layout/components/Navbar/index.vue index 6f7dd89..c9f4065 100644 --- a/src/layout/components/Navbar/index.vue +++ b/src/layout/components/Navbar/index.vue @@ -10,7 +10,7 @@ -
+
@@ -182,6 +182,8 @@ export default { if (iframe) { iframe.contentWindow.toggleSideBar() this.isIframeSidebarOpened = Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true + } else { + this.$store.commit('app/TOGGLE_SIDEBAR') } }, handleFullscreen() { diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index aa1f5da..32bba78 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -20,7 +20,7 @@ export default { if (icon.includes('el-icon')) { vnodes.push() } else { - vnodes.push() + vnodes.push() } } @@ -35,7 +35,9 @@ export default { diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index da39034..852a1b4 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -1,6 +1,5 @@