feat: 优化播放错误处理

This commit is contained in:
alger
2025-12-17 13:19:10 +08:00
parent 89c6b11110
commit 6bc168c5bd
9 changed files with 60 additions and 57 deletions
+2 -2
View File
@@ -88,14 +88,14 @@ export const useSleepTimerStore = defineStore('sleepTimer', () => {
/**
* 按歌曲数设置定时关闭
*/
const setSleepTimerBySongs = (songs: number) => {
const setSleepTimerBySongs = async (songs: number) => {
clearSleepTimer();
if (songs <= 0) {
return false;
}
const { usePlaylistStore } = require('./playlist');
const { usePlaylistStore } = await import('./playlist');
const playlistStore = usePlaylistStore();
sleepTimer.value = {