feat: 添加右键添加到歌单 可以创建歌单 可以在我的歌单中右键取消收藏

This commit is contained in:
alger
2025-01-22 23:37:50 +08:00
parent a6ff0e7f5c
commit 25c2180247
7 changed files with 610 additions and 35 deletions
+10 -3
View File
@@ -59,7 +59,12 @@
:class="setAnimationClass('animate__bounceInUp')"
:style="getItemAnimationDelay(index)"
>
<song-item :item="formatDetail(item)" @play="handlePlay" />
<song-item
:item="formatDetail(item)"
:can-remove="canRemove"
@play="handlePlay"
@remove-song="(id) => emit('remove-song', id)"
/>
</div>
<div v-if="isLoadingMore" class="loading-more">加载更多...</div>
<play-bottom />
@@ -97,15 +102,17 @@ const props = withDefaults(
[key: string]: any;
};
cover?: boolean;
canRemove?: boolean;
}>(),
{
loading: false,
cover: true,
zIndex: 9996
zIndex: 9996,
canRemove: false
}
);
const emit = defineEmits(['update:show', 'update:loading']);
const emit = defineEmits(['update:show', 'update:loading', 'remove-song']);
const page = ref(0);
const pageSize = 20;