优化进入、离开播放详情页的性能

This commit is contained in:
lyswhut
2021-10-26 10:30:01 +08:00
parent 89d161268e
commit 0d20869337
3 changed files with 15 additions and 17 deletions
-5
View File
@@ -18,7 +18,6 @@ const state = {
},
playIndex: -1,
changePlay: false,
isShowPlayerDetail: false,
playedList: [],
playMusicInfo: null,
@@ -197,7 +196,6 @@ const getters = {
musicInfo: state.playMusicInfo.musicInfo,
}
},
isShowPlayerDetail: state => state.isShowPlayerDetail,
playMusicInfo: state => state.playMusicInfo,
playedList: state => state.playedList,
tempPlayList: state => state.tempPlayList,
@@ -457,9 +455,6 @@ const mutations = {
clearPlayedList(state) {
state.playedList.splice(0, state.playedList.length)
},
visiblePlayerDetail(state, visible) {
state.isShowPlayerDetail = visible
},
setTempPlayList(state, list) {
state.tempPlayList.push(...list.map(({ musicInfo, listId }) => ({ musicInfo, listId, isTempPlay: true })))
if (!state.playMusicInfo) this.commit('player/playNext')