分离可用音质控制逻辑

This commit is contained in:
lyswhut
2020-04-29 12:33:41 +08:00
parent e51ee8c1ad
commit a62d8304e2
26 changed files with 127 additions and 133 deletions
@@ -29,6 +29,9 @@ export default {
info() {
return this.musicInfo || {}
},
qualityList() {
return window.globalObj.qualityList[this.musicInfo.source]
},
},
methods: {
handleClick(type) {
@@ -51,16 +54,7 @@ export default {
}
},
checkSource(type) {
switch (this.musicInfo.source) {
case 'wy':
case 'tx':
return type == '128k'
case 'xm':
return type == '128k' || type == '320k'
default:
return true
}
return this.qualityList.includes(type)
},
},
}