pull/2086/merge
Sprite137 2025-08-07 20:00:09 +08:00 committed by GitHub
commit 532d8d93a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 0 deletions

View File

@ -53,6 +53,14 @@ export default {
return this.info.meta?.qualitys?.filter(quality => this.checkSource(quality.type)) || []
},
},
beforeUnmount() {
document.removeEventListener('keyup', this.handleEscKey)
},
mounted() {
document.addEventListener('keyup', this.handleEscKey)
},
methods: {
handleClick(quality) {
void createDownloadTasks([this.musicInfo], quality, this.listId)
@ -61,6 +69,11 @@ export default {
handleClose() {
this.$emit('update:show', false)
},
handleEscKey(event) {
if (event.key === 'Escape') {
this.handleClose()
}
},
getTypeName(quality) {
switch (quality) {
case 'flac24bit':