From 4ab2d821ecf9dba28c2b435a7fffbaf2f7b568f3 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 1 Feb 2023 17:44:30 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=20=E4=BC=98=E5=8C=96=20webTerminal?= =?UTF-8?q?=20=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/components/cli/terminal.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nezha-fronted/src/components/cli/terminal.vue b/nezha-fronted/src/components/cli/terminal.vue index ef8f6ee2e..e1e32b1c5 100644 --- a/nezha-fronted/src/components/cli/terminal.vue +++ b/nezha-fronted/src/components/cli/terminal.vue @@ -96,6 +96,7 @@ export default { const self = this this.name = localStorage.getItem('nz-username') this.username = localStorage.getItem('nz-username') + window.opener.name = 'parent' window.onbeforeunload = () => { const opener = window.opener opener.postMessage( @@ -178,7 +179,7 @@ export default { logout () { this.$get('logout').then(() => { this.logoutSuccess() - document.location.href = '/' + window.open('', window.opener.name) }) } }