mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-14 06:30:49 +08:00
🐞 fix: 修复播放次序问题
This commit is contained in:
@@ -71,7 +71,6 @@ const emits = defineEmits(['play'])
|
||||
const playMusicEvent = (item: any) => {
|
||||
store.commit('setPlay', item)
|
||||
store.commit('setIsPlay', true)
|
||||
store.state.playListIndex = 0
|
||||
emits('play', item)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -50,7 +50,9 @@ const mutations = {
|
||||
state.play = play
|
||||
},
|
||||
setPlayList(state: State, playList: SongResult[]) {
|
||||
state.playListIndex = 0
|
||||
state.playListIndex = playList.findIndex(
|
||||
(item) => item.id === state.playMusic.id
|
||||
)
|
||||
state.playList = playList
|
||||
},
|
||||
async nextPlay(state: State) {
|
||||
|
||||
Reference in New Issue
Block a user