feat(Playroom): 为播放队列中的歌曲添加点击播放功能

点击播放队列中的歌曲时,设置当前播放索引并开始播放
This commit is contained in:
Astrian Zheng 2025-05-26 08:31:33 +10:00
parent cc6c6e311e
commit fec29b01a4
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA

View File

@ -242,7 +242,7 @@ function makePlayQueueListDismiss() {
<hr class="border-[#ffffff39]" /> <hr class="border-[#ffffff39]" />
<div class="flex-auto h-0 overflow-y-auto px-4 flex flex-col gap-2"> <div class="flex-auto h-0 overflow-y-auto px-4 flex flex-col gap-2">
<button v-for="(track, index) in playQueueStore.list" class="p-4 w-full rounded-md hover:bg-white/5 first:mt-2" :key="track.song.cid"> <button v-for="(track, index) in playQueueStore.list" class="p-4 w-full rounded-md hover:bg-white/5 first:mt-2" :key="track.song.cid" @click="playQueueStore.currentIndex = index; playQueueStore.isPlaying = true">
<div class="flex gap-2"> <div class="flex gap-2">
<div class="relative w-12 h-12 rounded-md shadow-xl overflow-hidden"> <div class="relative w-12 h-12 rounded-md shadow-xl overflow-hidden">
<img :src="track.album?.coverUrl" /> <img :src="track.album?.coverUrl" />