diff --git a/src/components/TrackList.vue b/src/components/TrackList.vue
index 1fcc25d..a505b9c 100644
--- a/src/components/TrackList.vue
+++ b/src/components/TrackList.vue
@@ -11,19 +11,20 @@
{{ $t("contextMenu.play") }}
{{ $t("contextMenu.playNext") }}
+
{{ $t("contextMenu.saveToMyLikedSongs") }}
{{ $t("contextMenu.removeFromMyLikedSongs") }}
- 添加到歌单
从歌单中删除
+ 添加到歌单
{
- this.showToast(
- data.body.code === 200 ? "已从歌单中删除" : data.body.message
- );
- this.$parent.removeTrack(trackID);
- });
+ if (confirm(`确定要从歌单删除 ${this.rightClickedTrack.name}?`)) {
+ let trackID = this.rightClickedTrack.id;
+ addOrRemoveTrackFromPlaylist({
+ op: "del",
+ pid: this.id,
+ tracks: trackID,
+ }).then((data) => {
+ this.showToast(
+ data.body.code === 200 ? "已从歌单中删除" : data.body.message
+ );
+ this.$parent.removeTrack(trackID);
+ });
+ }
},
},
};