feat: 实现搜索结果的分类计数功能

添加搜索关键词时显示匹配结果数量的功能,同时优化了应用卡片和网格的UI样式
This commit is contained in:
2026-03-29 14:21:48 +08:00
parent d144d0d398
commit 5b2d96cf0a
3 changed files with 40 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div
v-if="!loading"
class="grid gap-5 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4"
class="grid gap-4 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4"
>
<AppCard
v-for="(app, index) in apps"
@@ -12,23 +12,26 @@
</div>
<div
v-else
class="grid gap-5 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4"
class="grid gap-4 sm:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4"
>
<div
v-for="n in 8"
:key="n"
class="flex gap-4 rounded-2xl border border-slate-200/60 bg-white/80 p-4 shadow-sm dark:border-slate-800/60 dark:bg-slate-900/50"
class="flex gap-3 rounded-xl border border-slate-200/60 bg-white/80 p-4 shadow-sm dark:border-slate-800/60 dark:bg-slate-900/50"
>
<div
class="h-16 w-16 animate-pulse rounded-2xl bg-slate-200 dark:bg-slate-800"
class="h-14 w-14 shrink-0 animate-pulse rounded-xl bg-slate-200 dark:bg-slate-800"
></div>
<div class="flex flex-1 flex-col justify-center gap-2">
<div class="flex flex-1 flex-col gap-1.5">
<div
class="h-4 w-2/3 animate-pulse rounded-full bg-slate-200 dark:bg-slate-800"
></div>
<div
class="h-3 w-1/2 animate-pulse rounded-full bg-slate-200/80 dark:bg-slate-800/80"
></div>
<div
class="h-3 w-3/4 animate-pulse rounded-full bg-slate-200/60 dark:bg-slate-800/60"
></div>
</div>
</div>
</div>