From 1c81231fa7935b9e8f488ef13e8639254b1dc71a Mon Sep 17 00:00:00 2001 From: likexuan Date: Tue, 29 Nov 2022 16:55:58 +0800 Subject: [PATCH] =?UTF-8?q?NEZ-2427=20fix=20:=20Web=20terminal=20logs=20?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E4=B8=A4=E5=88=97=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/bottomBox/tabs/terminalLogSftpTab.vue | 10 ++++++++++ .../common/table/settings/terminalLogTable.vue | 15 ++++++++++++++- .../src/components/page/config/about.vue | 5 ++++- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogSftpTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogSftpTab.vue index 291817d18..70380857b 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogSftpTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/terminalLogSftpTab.vue @@ -69,6 +69,16 @@ export default { orderBy: { order: 'ascending', prop: 'id' } } }, + watch: { + obj: { + deep: true, + handler (n) { + if (n) { + this.getTableData() + } + } + } + }, methods: { async getTableData () { this.$set(this.searchLabel, 'uuid', this.obj.uuid) diff --git a/nezha-fronted/src/components/common/table/settings/terminalLogTable.vue b/nezha-fronted/src/components/common/table/settings/terminalLogTable.vue index dcc45abea..34f700a27 100644 --- a/nezha-fronted/src/components/common/table/settings/terminalLogTable.vue +++ b/nezha-fronted/src/components/common/table/settings/terminalLogTable.vue @@ -214,7 +214,20 @@ export default { width: 150, sortable: 'custom' } - ] + ], + timer: null + } + }, + methods: { + showBottomBox (targetTab, row) { + if (this.timer) { + clearTimeout(this.timer) + } + const self = this + this.timer = setTimeout(() => { + self.$emit('showBottomBox', targetTab, row) + self.timer = null + }, 200) } }, computed: { diff --git a/nezha-fronted/src/components/page/config/about.vue b/nezha-fronted/src/components/page/config/about.vue index e9e3dfeec..a2ab3a508 100644 --- a/nezha-fronted/src/components/page/config/about.vue +++ b/nezha-fronted/src/components/page/config/about.vue @@ -1,5 +1,5 @@