优化首页账号展示体验

This commit is contained in:
yml2213
2026-06-04 12:57:34 +08:00
parent 75e849a91a
commit e41d3a923a
6 changed files with 157 additions and 23 deletions
@@ -1,6 +1,5 @@
<script setup lang="ts">
import { computed, ref } from 'vue'
import { ElEmpty } from 'element-plus'
import {
defaultHomeAnnouncements,
defaultHomeBanners,
@@ -174,10 +173,11 @@ loadHome()
@update:sort-by="sortBy = $event"
/>
<el-empty
v-if="!loading && listings.length === 0"
description="没有符合条件的账号"
/>
<div v-if="!loading && listings.length === 0" class="home-empty-state">
<strong>没有符合条件的账号</strong>
<span>可以放宽筛选条件或切回全部专区</span>
<button type="button" @click="handleResetFilters">重置条件</button>
</div>
<div v-else v-loading="loading" class="enhanced-desktop-list">
<ListingCard
v-for="item in listings"
@@ -259,4 +259,38 @@ loadHome()
gap: 16px;
min-width: 0;
}
.home-empty-state {
display: grid;
place-items: center;
gap: 8px;
min-height: 148px;
padding: 28px;
border: 1px dashed #d8e1ee;
border-radius: 16px;
background: #ffffff;
color: #7b8798;
text-align: center;
}
.home-empty-state strong {
color: #17233d;
font-size: 18px;
}
.home-empty-state span {
font-size: 13px;
}
.home-empty-state button {
height: 34px;
margin-top: 4px;
padding: 0 16px;
border: 1px solid #ff6a00;
border-radius: 8px;
background: #fff7ed;
color: #ff6a00;
font-weight: 800;
cursor: pointer;
}
</style>