From b399fd9f6e8a4496769905cf4c501426573a9ab0 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Mon, 7 Jun 2021 17:30:19 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-735=20=EF=BC=9Afix=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20web=20terminal=20=E6=9C=80=E5=B0=8F=E5=8C=96?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E9=87=8D=E6=96=B0=E6=98=BE=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/cli/webSSH.vue | 2 +- nezha-fronted/src/store/index.js | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/nezha-fronted/src/components/cli/webSSH.vue b/nezha-fronted/src/components/cli/webSSH.vue index 435f19562..2b9b17a71 100644 --- a/nezha-fronted/src/components/cli/webSSH.vue +++ b/nezha-fronted/src/components/cli/webSSH.vue @@ -534,7 +534,7 @@ export default { } }, 10) - // this.$store.commit('addConsole'); + this.$store.commit('addConsoleNum') }, show (id, host, accountId, port) { this.addConsole(id, host, accountId, port, 'asset') diff --git a/nezha-fronted/src/store/index.js b/nezha-fronted/src/store/index.js index 092b8bb82..41476e79d 100644 --- a/nezha-fronted/src/store/index.js +++ b/nezha-fronted/src/store/index.js @@ -67,7 +67,7 @@ const store = new Vuex.Store({ }, getIsShrink (state) { return state.isShrink - }, + } }, mutations: { /* 监听对象变化,用于顶部菜单与底部内容的同步 */ @@ -88,9 +88,11 @@ const store = new Vuex.Store({ }, addConsole (state, data) { // 打开console,并新建一个console state.consoleShow = true - state.consoleCount++ state.isAddConsole = true state.consoleParam = data + setTimeout(() => { + state.isAddConsole = false + }, 100) }, addConsoleNum (state) { state.consoleCount++ @@ -145,7 +147,7 @@ const store = new Vuex.Store({ }, isShrink (state) { state.isShrink = !state.isShrink - localStorage.setItem('nz-left-menu-shrink', state.isShrink) + localStorage.setItem('nz-left-menu-shrink', state.isShrink) } }, actions: {