perf: 标签为空展示

This commit is contained in:
rd
2025-09-18 14:44:24 +08:00
parent c81dc8dd28
commit 7e112d5d76

View File

@ -51,7 +51,7 @@
{{ TABS_LIST.find((item) => item.value === record.type)?.label ?? '-' }} {{ TABS_LIST.find((item) => item.value === record.type)?.label ?? '-' }}
</template> </template>
<template v-else-if="column.dataIndex === 'tags'" #customRender="{ record }"> <template v-else-if="column.dataIndex === 'tags'" #customRender="{ record }">
<div class="flex flex-wrap gap-4px"> <div v-if="record.tags.length > 0" class="flex flex-wrap gap-4px">
<Tag v-for="tag in record.tags" :key="tag.id" class="mr-0 rounded-4px bg-#F2F3F5 px-8px"> <Tag v-for="tag in record.tags" :key="tag.id" class="mr-0 rounded-4px bg-#F2F3F5 px-8px">
<Tooltip v-if="tag.name.length > 5" :title="tag.name"> <Tooltip v-if="tag.name.length > 5" :title="tag.name">
<span class="cts !color-#55585F !lh-20px !text-12px"> {{ `${tag.name.slice(0, 5)}...` }} </span> <span class="cts !color-#55585F !lh-20px !text-12px"> {{ `${tag.name.slice(0, 5)}...` }} </span>
@ -59,6 +59,7 @@
<span v-else class="cts !color-#55585F !lh-20px !text-12px"> {{ tag.name }} </span> <span v-else class="cts !color-#55585F !lh-20px !text-12px"> {{ tag.name }} </span>
</Tag> </Tag>
</div> </div>
<template v-else> -</template>
</template> </template>
<template v-else-if="column.dataIndex === 'size'" #customRender="{ record }"> <template v-else-if="column.dataIndex === 'size'" #customRender="{ record }">
<span class="cts num">{{ formatFileSize(record.size) }}</span> <span class="cts num">{{ formatFileSize(record.size) }}</span>