We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e42787b commit d02805bCopy full SHA for d02805b
1 file changed
src/composables/List/useListActions.ts
@@ -1,17 +1,23 @@
1
import type { SongType } from "@/types/main";
2
import { usePlayerController } from "@/core/player/PlayerController";
3
+import { useStatusStore } from "@/stores";
4
5
/**
6
* 列表操作逻辑
7
*/
8
export const useListActions = () => {
9
const player = usePlayerController();
10
+ const statusStore = useStatusStore();
11
12
13
* 播放全部歌曲
14
15
const playAllSongs = (songs: SongType[], playListId?: number) => {
16
if (!songs?.length) return;
17
+ // 如果是单曲循环模式,自动切换为顺序播放
18
+ if (statusStore.playSongMode === "repeat-once") {
19
+ player.togglePlayMode("repeat");
20
+ }
21
player.updatePlayList(songs, undefined, playListId);
22
};
23
0 commit comments