feat: 格式化代码

This commit is contained in:
alger
2025-09-14 00:19:41 +08:00
parent 74b9d73241
commit d8734f8302
39 changed files with 208 additions and 169 deletions
@@ -18,28 +18,28 @@ export function navigateToMusicList(
canRemove?: boolean;
}
) {
const musicStore = useMusicStore();
const { id, type, name, songList, listInfo, canRemove = false } = options;
const musicStore = useMusicStore();
const { id, type, name, songList, listInfo, canRemove = false } = options;
// 如果是每日推荐,不需要设置 musicStore,直接从 recommendStore 获取
if (type !== 'dailyRecommend') {
musicStore.setCurrentMusicList(songList, name, listInfo, canRemove);
} else {
// 确保 musicStore 的数据被清空,避免显示旧的列表
musicStore.clearCurrentMusicList();
}
// 如果是每日推荐,不需要设置 musicStore,直接从 recommendStore 获取
if (type !== 'dailyRecommend') {
musicStore.setCurrentMusicList(songList, name, listInfo, canRemove);
} else {
// 确保 musicStore 的数据被清空,避免显示旧的列表
musicStore.clearCurrentMusicList();
}
// 路由跳转
if (id) {
// 路由跳转
if (id) {
router.push({
name: 'musicList',
params: { id },
query: { type }
});
} else {
} else {
router.push({
name: 'musicList',
query: { type: 'dailyRecommend' }
});
}
}
}