feat: 给导航栏下载按钮添加数量提示

This commit is contained in:
lanyeeee
2025-08-15 07:43:22 +08:00
parent 9e38a1f467
commit 7662f47f80
+2
View File
@@ -96,6 +96,7 @@ onMounted(() => {
<n-tooltip placement="right" trigger="hover" :show-arrow="false"> <n-tooltip placement="right" trigger="hover" :show-arrow="false">
下载 下载
<template #trigger> <template #trigger>
<n-badge :value="store.uncompletedProgressesCount" :offset="[-7, 7]">
<div <div
ref="downloadButtonRef" ref="downloadButtonRef"
class="flex cursor-pointer hover:text-sky-5 hover:bg-gray-2/70 rounded py-1 my-1 px-2" class="flex cursor-pointer hover:text-sky-5 hover:bg-gray-2/70 rounded py-1 my-1 px-2"
@@ -103,6 +104,7 @@ onMounted(() => {
:class="{ 'text-sky-5': store.currentNavName === 'download' }"> :class="{ 'text-sky-5': store.currentNavName === 'download' }">
<PhDownload :weight="store.currentNavName === 'download' ? 'fill' : 'regular'" size="28" /> <PhDownload :weight="store.currentNavName === 'download' ? 'fill' : 'regular'" size="28" />
</div> </div>
</n-badge>
</template> </template>
</n-tooltip> </n-tooltip>