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