From 3168b905204ef1e2b5950314932e08f6c40a7d80 Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: Tue, 6 Apr 2021 15:13:23 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=94=80=E6=AF=81=E6=97=B6?= =?UTF-8?q?=E5=85=B3=E9=97=ADsseSource?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/UiHeader.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web_src/src/components/UiHeader.vue b/web_src/src/components/UiHeader.vue index ae0780be..85bb2302 100644 --- a/web_src/src/components/UiHeader.vue +++ b/web_src/src/components/UiHeader.vue @@ -71,6 +71,10 @@ export default { }, destroyed() { window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e)) + this.sseSource.removeEventListener('open', null); + this.sseSource.removeEventListener('message', null); + this.sseSource.removeEventListener('error', null); + this.sseSource.close(); // window.removeEventListener('unload', e => this.unloadHandler(e)) }, }