fix(播放队列): 修复随机播放模式下的状态重置问题
在Player组件中重置shuffleCurrent状态,确保随机播放逻辑正确执行。同时在AlbumDetail页面为随机播放按钮添加点击事件,正确设置随机播放状态。
This commit is contained in:
		
							parent
							
								
									d99ae28f8c
								
							
						
					
					
						commit
						0db105705b
					
				| 
						 | 
				
			
			@ -161,6 +161,8 @@ watch(() => playQueueStore.playMode.shuffle, (isShuffle) => {
 | 
			
		|||
		if (!playQueueStore.shuffleCurrent) {
 | 
			
		||||
			shuffledList.push(currentIndex)
 | 
			
		||||
		}
 | 
			
		||||
		// 重置 shuffleCurrent 标签
 | 
			
		||||
		playQueueStore.shuffleCurrent = undefined
 | 
			
		||||
 | 
			
		||||
		// 将剩余的项目列出来
 | 
			
		||||
		let shuffleSpace = [...Array(trackCount).keys()]
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -78,7 +78,12 @@ function playTheAlbum(from: number = 0) {
 | 
			
		|||
					</button>
 | 
			
		||||
 | 
			
		||||
					<button
 | 
			
		||||
						class="text-white w-10 h-10 bg-white/5 border border-[#ffffff39] rounded-full flex justify-center items-center">
 | 
			
		||||
						class="text-white w-10 h-10 bg-white/5 border border-[#ffffff39] rounded-full flex justify-center items-center"
 | 
			
		||||
						@click="() => {
 | 
			
		||||
							playTheAlbum()
 | 
			
		||||
							playQueue.shuffleCurrent = true
 | 
			
		||||
							playQueue.playMode.shuffle = true
 | 
			
		||||
						}">
 | 
			
		||||
						<ShuffleIcon :size="4" />
 | 
			
		||||
					</button>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user