feat: 添加模板为空时的提示信息

This commit is contained in:
2025-01-21 03:57:59 +08:00
parent 6e9b5de8d1
commit b602f5c00e
2 changed files with 36 additions and 0 deletions

View File

@@ -56,6 +56,7 @@ const onDownloadClick = (ppt: PPTTemplate) => {
<!-- cat selector -->
<div class="flex flex-wrap gap-2">
<div
v-if="pptTemplates?.data.items.length !== 0"
v-for="cat in [
{ id: 0, type: '全部' },
...(pptCategories?.data.items || []),
@@ -74,6 +75,19 @@ const onDownloadClick = (ppt: PPTTemplate) => {
<div class="space-y-4">
<div
v-if="pptTemplates?.data.items.length === 0"
class="w-full py-20 flex flex-col justify-center items-center gap-2"
>
<Icon
class="text-7xl text-neutral-300 dark:text-neutral-700"
name="i-tabler-photo-hexagon"
/>
<p class="text-sm text-neutral-500 dark:text-neutral-400">
暂时没有可用模板
</p>
</div>
<div
v-else
class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 2xl:grid-cols-4 gap-4 mt-4"
>
<div