优化歌单、排行榜一键播放按钮的播放机制

This commit is contained in:
lyswhut
2021-12-23 15:28:01 +08:00
parent 469a88f368
commit 3ff0dbb7ef
6 changed files with 91 additions and 18 deletions
+6 -2
View File
@@ -388,14 +388,18 @@ const mutations = {
if (tempPlayList.length) this.commit('player/clearTempPlayeList')
playMusic()
},
setTempList(state, { list, index }) {
updateList({ id: tempList.id, list })
setTempList(state, { list, id, index }) {
updateList({ id: tempList.id, meta: { id }, list })
this.commit('player/setList', {
listId: tempList.id,
index,
})
window.eventHub.emit(eventListNames.listChange, [tempList.id])
},
updateTempList(state, { id, list }) {
updateList({ id: tempList.id, meta: { id }, list })
window.eventHub.emit(eventListNames.listChange, [tempList.id])
},
// setPlayIndex(state, index) {
// state.playIndex = index
// },