Skip to content

Commit a8bcfbf

Browse files
author
zhangtao
committed
fix(web): 修复卡片列表有数据仍显示空状态
1 parent 259e059 commit a8bcfbf

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

  • frontend/web/src/components/cards/fa-card-grid

‎frontend/web/src/components/cards/fa-card-grid/index.vue‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@
6262
</ElRow>
6363
</div>
6464

65-
<!-- 空状态:有 #empty 插槽时整块替换,避免叠加默认 ElEmpty -->
66-
<slot v-if="$slots.empty" name="empty" />
67-
<FaEmptyState v-else icon="ri:inbox-line" :title="emptyText" />
65+
<!-- 空状态:有数据时不能渲染,否则会盖在卡片上显示“暂无数据” -->
66+
<template v-if="isEmpty">
67+
<slot v-if="$slots.empty" name="empty" />
68+
<FaEmptyState v-else icon="ri:inbox-line" :title="emptyText" />
69+
</template>
6870
</ElScrollbar>
6971

7072
<!-- 分页 -->

0 commit comments

Comments
 (0)