From a6b2ed5d8f5b4222050d4021de5a57e1d4a8e607 Mon Sep 17 00:00:00 2001 From: chaos-zhu Date: Sun, 18 Aug 2024 17:39:32 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=94=AF=E6=8C=81=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E6=A0=8F=E6=8A=98=E5=8F=A0=E4=B8=8E=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/aside-box.vue | 51 ++++++++++++++----- web/src/store/index.js | 8 ++- .../terminal/components/terminal-tab.vue | 30 ++++++----- .../views/terminal/components/terminal.vue | 3 +- 4 files changed, 63 insertions(+), 29 deletions(-) diff --git a/web/src/components/aside-box.vue b/web/src/components/aside-box.vue index b9361ca..726c53b 100644 --- a/web/src/components/aside-box.vue +++ b/web/src/components/aside-box.vue @@ -2,18 +2,22 @@
logo -

EasyNode

+ +

EasyNode

+
+ + + @@ -21,6 +25,10 @@ +
+ + +
@@ -33,7 +41,9 @@ import { ScaleToOriginal, ArrowRight, Pointer, - FolderOpened + FolderOpened, + Expand, + Fold } from '@element-plus/icons-vue' import { useRoute } from 'vue-router' @@ -79,6 +89,8 @@ let menuList = reactive([ }, ]) +let menuCollapse = computed(() => $store.menuCollapse) + // eslint-disable-next-line no-useless-escape const regex = /^\/([^\/]+)/ let defaultActiveMenu = computed(() => { @@ -96,13 +108,16 @@ const handleSelect = (path) => { // console.log(path) $router.push(path) } + +const handleCollapse = () => { + $store.setMenuCollapse(!menuCollapse.value) +}