From 45dfa6ee044678299454e31ed339c6304b08530f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B2=E6=82=A6?= Date: Tue, 6 Jan 2026 14:19:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E5=9C=A8=E6=92=AD=E6=94=BE=E5=88=97?= =?UTF-8?q?=E8=A1=A8=EF=BC=88PlaylistDrawer=EF=BC=89=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BA=86=E6=92=AD=E6=94=BE=E6=A8=A1=E5=BC=8F=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 83 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 30 deletions(-) diff --git a/index.html b/index.html index 1c4e866..83952e1 100644 --- a/index.html +++ b/index.html @@ -640,38 +640,59 @@ ); }; - const PlaylistDrawer = ({ playlist, currentSong, playSong, onClose, clearPlaylist, deleteSong }) => ( -
-
e.stopPropagation()}> -
-

当前播放 ({playlist.length})

-
- - + const PlaylistDrawer = ({ playlist, currentSong, playSong, onClose, clearPlaylist, deleteSong, mode, toggleMode }) => { + const getModeText = () => { + switch(mode) { + case 'one': return '单曲循环'; + case 'shuffle': return '随机播放'; + default: return '列表循环'; + } + }; + + return ( +
+
e.stopPropagation()}> +
+
+

当前播放 ({playlist.length})

+ {playlist.length > 0 && ( + + )} +
+
+ + +
+
+
+ {playlist.length === 0 ? ( +
+ +

播放列表为空

+
+ ) : ( + playlist.map((song, idx) => ( + playSong(song)} + onDelete={() => deleteSong(idx)} + /> + )) + )}
-
- {playlist.length === 0 ? ( -
- -

播放列表为空

-
- ) : ( - playlist.map((song, idx) => ( - playSong(song)} - onDelete={() => deleteSong(idx)} - /> - )) - )} -
-
- ); + ); + }; const TopListPage = ({ source, onBack, onPlaySong, onLike, isLiked }) => { const [lists, setLists] = useState([]); @@ -1316,13 +1337,15 @@ )} {showPlaylist && ( - { setCurrentSong(song); setIsPlaying(true); }} onClose={() => setShowPlaylist(false)} clearPlaylist={() => { setPlaylist([]); setCurrentSong(null); setIsPlaying(false); }} deleteSong={deleteFromPlaylist} + mode={mode} + toggleMode={toggleMode} /> )}