Skip to content

Commit 019b78b

Browse files
committed
🐞 fix: 修复歌单无法删除歌曲
1 parent cf88c76 commit 019b78b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/components/List/SongList.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ const delCloudSong = (data, song, index) => {
439439
440440
// 歌单歌曲删除
441441
const deletePlaylistSong = (pid, song, data, index) => {
442+
if (!pid || !song) return $message.error("无法正确定位到歌单,请重试");
442443
$dialog.warning({
443444
title: "确认删除",
444445
content: `确认从歌单中移除 ${song.name}?该操作无法撤销!`,

src/components/List/SongListDrawer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
@click="
131131
() => {
132132
drawerShow = false;
133-
emit('deletePlaylistSong', playlistData, songData, songIndex);
133+
emit('deletePlaylistSong', songSourceId, songData, playlistData, songIndex);
134134
}
135135
"
136136
>

src/components/List/SongListDropdown.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ const openDropdown = (e, data, song, index, sourceId, type) => {
240240
show: !isCloud && isUserPlaylist,
241241
props: {
242242
onClick: () => {
243-
emit("deletePlaylistSong", data, song, index);
243+
emit("deletePlaylistSong", sourceId, song, data, index);
244244
},
245245
},
246246
icon: renderIcon("delete"),

0 commit comments

Comments
 (0)