Skip to content

Commit

Permalink
refactor: 无需使用AbortController
Browse files Browse the repository at this point in the history
  • Loading branch information
zonemeen committed Mar 15, 2024
1 parent fd7b901 commit 3d1532e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions template/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
},
},
player: null,
controller: null,
activeId: '',
isInitial: true,
}
Expand All @@ -116,7 +115,6 @@
this.player.destroy()
},
created() {
this.controller = new AbortController()
this.player = new APlayer({
container: document.getElementById('aplayer'),
listMaxHeight: 450,
Expand Down Expand Up @@ -168,10 +166,6 @@
}
},
onParamsChange({ current }) {
if (this.downloadLoadingList.length) {
this.controller.abort()
this.controller = new AbortController()
}
this.activeId = ''
this.isInitial = true
this.downloadLoadingList = []
Expand All @@ -192,7 +186,6 @@
`/download?service=${service}&url=${url}&songName=${songName}&lyricUrl=${lyricUrl}`,
{
method: 'GET',
signal: this.controller.signal,
}
)
const blob = await response.blob()
Expand Down

0 comments on commit 3d1532e

Please sign in to comment.