From 3d1532e666e609122bbaf1c37dcb6a8d8b6c9c68 Mon Sep 17 00:00:00 2001 From: zonemeen Date: Fri, 15 Mar 2024 20:24:56 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=97=A0=E9=9C=80=E4=BD=BF?= =?UTF-8?q?=E7=94=A8AbortController?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/index.html | 7 ------- 1 file changed, 7 deletions(-) diff --git a/template/index.html b/template/index.html index ddeb24833..54fbf7891 100644 --- a/template/index.html +++ b/template/index.html @@ -107,7 +107,6 @@ }, }, player: null, - controller: null, activeId: '', isInitial: true, } @@ -116,7 +115,6 @@ this.player.destroy() }, created() { - this.controller = new AbortController() this.player = new APlayer({ container: document.getElementById('aplayer'), listMaxHeight: 450, @@ -168,10 +166,6 @@ } }, onParamsChange({ current }) { - if (this.downloadLoadingList.length) { - this.controller.abort() - this.controller = new AbortController() - } this.activeId = '' this.isInitial = true this.downloadLoadingList = [] @@ -192,7 +186,6 @@ `/download?service=${service}&url=${url}&songName=${songName}&lyricUrl=${lyricUrl}`, { method: 'GET', - signal: this.controller.signal, } ) const blob = await response.blob()