|
|
@ -209,8 +209,8 @@ async function executeDelete() { |
|
|
<USelect v-model="pageSize" :items="pageSizeItems" value-key="value" /> |
|
|
<USelect v-model="pageSize" :items="pageSizeItems" value-key="value" /> |
|
|
</UFormField> |
|
|
</UFormField> |
|
|
<UButton |
|
|
<UButton |
|
|
color="error" |
|
|
:color="batchCount > 0 ? 'error' : 'neutral'" |
|
|
variant="soft" |
|
|
variant="outline" |
|
|
:disabled="batchCount === 0" |
|
|
:disabled="batchCount === 0" |
|
|
@click="openConfirm([...selectedIds])" |
|
|
@click="openConfirm([...selectedIds])" |
|
|
> |
|
|
> |
|
|
@ -223,38 +223,38 @@ async function executeDelete() { |
|
|
</div> |
|
|
</div> |
|
|
<UEmpty v-else-if="!items.length" title="暂无记录" description="当前筛选下没有孤儿图片" /> |
|
|
<UEmpty v-else-if="!items.length" title="暂无记录" description="当前筛选下没有孤儿图片" /> |
|
|
<div v-else class="overflow-x-auto rounded-lg border border-default"> |
|
|
<div v-else class="overflow-x-auto rounded-lg border border-default"> |
|
|
<table class="w-full text-sm"> |
|
|
<table class="w-full min-w-[720px] table-fixed text-sm"> |
|
|
<thead> |
|
|
<thead> |
|
|
<tr class="text-left text-muted border-b border-default bg-elevated/40"> |
|
|
<tr class="text-left text-muted border-b border-default bg-elevated/40"> |
|
|
<th class="p-3 w-10"> |
|
|
<th class="p-3 w-10 align-middle"> |
|
|
<UCheckbox |
|
|
<UCheckbox |
|
|
v-if="deletableOnPage.length" |
|
|
v-if="deletableOnPage.length" |
|
|
:model-value="allDeletableOnPageSelected" |
|
|
:model-value="allDeletableOnPageSelected" |
|
|
@update:model-value="toggleSelectAllOnPage(!!$event)" |
|
|
@update:model-value="toggleSelectAllOnPage(!!$event)" |
|
|
/> |
|
|
/> |
|
|
</th> |
|
|
</th> |
|
|
<th class="p-3 w-24"> |
|
|
<th class="p-3 w-20 align-middle"> |
|
|
预览 |
|
|
预览 |
|
|
</th> |
|
|
</th> |
|
|
<th class="p-3 min-w-[8rem]"> |
|
|
<th class="p-3 align-middle w-[32%]"> |
|
|
storageKey |
|
|
文件 |
|
|
</th> |
|
|
</th> |
|
|
<th class="p-3 whitespace-nowrap"> |
|
|
<th class="p-3 whitespace-nowrap w-16 align-middle"> |
|
|
大小 |
|
|
大小 |
|
|
</th> |
|
|
</th> |
|
|
<th class="p-3 whitespace-nowrap"> |
|
|
<th class="p-3 whitespace-nowrap w-36 align-middle"> |
|
|
创建 |
|
|
创建 |
|
|
</th> |
|
|
</th> |
|
|
<th class="p-3 whitespace-nowrap hidden lg:table-cell"> |
|
|
<th class="p-3 whitespace-nowrap hidden lg:table-cell w-36 align-middle"> |
|
|
首次引用 |
|
|
首次引用 |
|
|
</th> |
|
|
</th> |
|
|
<th class="p-3 whitespace-nowrap hidden lg:table-cell"> |
|
|
<th class="p-3 whitespace-nowrap hidden lg:table-cell w-36 align-middle"> |
|
|
解除引用 |
|
|
解除引用 |
|
|
</th> |
|
|
</th> |
|
|
<th class="p-3"> |
|
|
<th class="p-3 w-24 align-middle whitespace-nowrap"> |
|
|
状态 |
|
|
状态 |
|
|
</th> |
|
|
</th> |
|
|
<th class="p-3 text-right w-28"> |
|
|
<th class="p-3 text-right w-24 align-middle whitespace-nowrap"> |
|
|
操作 |
|
|
操作 |
|
|
</th> |
|
|
</th> |
|
|
</tr> |
|
|
</tr> |
|
|
@ -273,12 +273,17 @@ async function executeDelete() { |
|
|
<img |
|
|
<img |
|
|
:src="row.publicUrl" |
|
|
:src="row.publicUrl" |
|
|
:alt="row.storageKey" |
|
|
:alt="row.storageKey" |
|
|
class="h-14 w-14 object-cover rounded border border-default" |
|
|
class="h-14 w-14 shrink-0 object-cover rounded border border-default" |
|
|
loading="lazy" |
|
|
loading="lazy" |
|
|
> |
|
|
> |
|
|
</td> |
|
|
</td> |
|
|
<td class="p-3 align-middle font-mono text-xs break-all max-w-[14rem]"> |
|
|
<td class="p-3 align-middle max-w-0"> |
|
|
|
|
|
<div |
|
|
|
|
|
class="truncate font-mono text-xs text-default" |
|
|
|
|
|
:title="row.storageKey" |
|
|
|
|
|
> |
|
|
{{ row.storageKey }} |
|
|
{{ row.storageKey }} |
|
|
|
|
|
</div> |
|
|
</td> |
|
|
</td> |
|
|
<td class="p-3 align-middle tabular-nums whitespace-nowrap"> |
|
|
<td class="p-3 align-middle tabular-nums whitespace-nowrap"> |
|
|
{{ formatBytes(row.sizeBytes) }} |
|
|
{{ formatBytes(row.sizeBytes) }} |
|
|
@ -293,12 +298,26 @@ async function executeDelete() { |
|
|
{{ formatDt(row.dereferencedAt) }} |
|
|
{{ formatDt(row.dereferencedAt) }} |
|
|
</td> |
|
|
</td> |
|
|
<td class="p-3 align-middle"> |
|
|
<td class="p-3 align-middle"> |
|
|
<UBadge v-if="row.state === 'deletable'" color="error" variant="subtle"> |
|
|
<div class="flex items-center justify-start"> |
|
|
|
|
|
<UBadge |
|
|
|
|
|
v-if="row.state === 'deletable'" |
|
|
|
|
|
color="error" |
|
|
|
|
|
variant="subtle" |
|
|
|
|
|
size="sm" |
|
|
|
|
|
class="whitespace-nowrap" |
|
|
|
|
|
> |
|
|
可删除 |
|
|
可删除 |
|
|
</UBadge> |
|
|
</UBadge> |
|
|
<UBadge v-else color="warning" variant="subtle"> |
|
|
<UBadge |
|
|
|
|
|
v-else |
|
|
|
|
|
color="warning" |
|
|
|
|
|
variant="subtle" |
|
|
|
|
|
size="sm" |
|
|
|
|
|
class="whitespace-nowrap" |
|
|
|
|
|
> |
|
|
宽限期 |
|
|
宽限期 |
|
|
</UBadge> |
|
|
</UBadge> |
|
|
|
|
|
</div> |
|
|
</td> |
|
|
</td> |
|
|
<td class="p-3 align-middle text-right"> |
|
|
<td class="p-3 align-middle text-right"> |
|
|
<UButton |
|
|
<UButton |
|
|
@ -306,11 +325,18 @@ async function executeDelete() { |
|
|
size="xs" |
|
|
size="xs" |
|
|
color="error" |
|
|
color="error" |
|
|
variant="soft" |
|
|
variant="soft" |
|
|
|
|
|
class="whitespace-nowrap" |
|
|
@click="openConfirm([row.id])" |
|
|
@click="openConfirm([row.id])" |
|
|
> |
|
|
> |
|
|
删除 |
|
|
删除 |
|
|
</UButton> |
|
|
</UButton> |
|
|
<span v-else class="text-muted text-xs">—</span> |
|
|
<span |
|
|
|
|
|
v-else |
|
|
|
|
|
class="inline-block text-left text-xs text-muted leading-snug max-w-[5.5rem]" |
|
|
|
|
|
title="宽限期未满,不可删除。可在「可删除」筛选中查看已到期项。" |
|
|
|
|
|
> |
|
|
|
|
|
宽限中 |
|
|
|
|
|
</span> |
|
|
</td> |
|
|
</td> |
|
|
</tr> |
|
|
</tr> |
|
|
</tbody> |
|
|
</tbody> |
|
|
|