feat: 优化歌曲列表组件布局,添加底部间距以提升视觉效果

This commit is contained in:
alger
2025-06-07 22:47:34 +08:00
parent 934580552d
commit fabcf289dc
3 changed files with 27 additions and 22 deletions
+3 -1
View File
@@ -109,15 +109,17 @@
@scroll="handleVirtualScroll" @scroll="handleVirtualScroll"
> >
<template #default="{ item, index }"> <template #default="{ item, index }">
<div>
<div class="double-item"> <div class="double-item">
<song-item <song-item
:index="index" :index="index"
:compact="isCompactLayout" :compact="isCompactLayout"
:item="formatSong(item)" :item="formatSong(item)"
@play="handlePlay" @play="handlePlay"
:style="{paddingBottom: index === filteredSongs.length - 1 ? '100px' : '0'}"
/> />
</div> </div>
<div v-if="index === filteredSongs.length - 1" class="h-36"></div>
</div>
</template> </template>
</n-virtual-list> </n-virtual-list>
+3 -1
View File
@@ -168,6 +168,7 @@
@scroll="handleVirtualScroll" @scroll="handleVirtualScroll"
> >
<template #default="{ item, index }"> <template #default="{ item, index }">
<div>
<div class="double-item"> <div class="double-item">
<song-item <song-item
:index="index" :index="index"
@@ -179,9 +180,10 @@
@play="handlePlay" @play="handlePlay"
@remove-song="handleRemoveSong" @remove-song="handleRemoveSong"
@select="(id, selected) => handleSelect(id, selected)" @select="(id, selected) => handleSelect(id, selected)"
:style="{paddingBottom: index === filteredSongs.length - 1 ? '100px' : '0'}"
/> />
</div> </div>
<div v-if="index === filteredSongs.length - 1" class="h-36"></div>
</div>
</template> </template>
</n-virtual-list> </n-virtual-list>
</div> </div>
+2 -1
View File
@@ -47,7 +47,7 @@
/> />
<div class="play-list-item-info"> <div class="play-list-item-info">
<div class="play-list-item-name"> <div class="play-list-item-name">
{{ item.name }} <n-ellipsis :line-clamp="1">{{ item.name }}</n-ellipsis>
<div v-if="item.creator.userId === user.userId" class="playlist-creator-tag"> <div v-if="item.creator.userId === user.userId" class="playlist-creator-tag">
{{ t('user.playlist.mine') }} {{ t('user.playlist.mine') }}
</div> </div>
@@ -396,6 +396,7 @@ const isLoggedIn = computed(() => userStore.user);
height: 18px; height: 18px;
font-size: 10px; font-size: 10px;
font-weight: 500; font-weight: 500;
min-width: 60px;
backdrop-filter: blur(4px); backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
} }