From 38e4af7ca9d1c60c4976f690aba2153ce0907b46 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Sat, 06 Dec 2025 16:05:11 +0800
Subject: [PATCH] feat:更新使用vue3表格如果数据为空,统一增加空图
---
src/views/tickets/ticket.vue | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/views/tickets/ticket.vue b/src/views/tickets/ticket.vue
index f9b3a3d..cbf70b9 100644
--- a/src/views/tickets/ticket.vue
+++ b/src/views/tickets/ticket.vue
@@ -243,9 +243,19 @@
</template>
</template>
</el-table-column>
+ <template #empty>
+ <el-empty
+ class="custom-empty"
+ :image-size="100"
+ >
+ <template #description>
+ <span class="custom-text">暂无数据</span>
+ </template>
+ </el-empty>
+ </template>
</el-table>
</div>
- <div class="pagination">
+ <div class="pagination" v-if="tableData.length > 0">
<el-pagination
class="table-pagination"
v-model:current-page="page.currentPage"
@@ -1472,7 +1482,7 @@
flex-direction: column;
}
.dataTable {
- height: 0;
+ height: 0;
flex: 1;
overflow: auto;
}
@@ -1531,6 +1541,10 @@
:deep(.el-table--border) {
border: 1px solid #ebeef5;
}
+
+ :deep(.el-table__empty-block) {
+ height: calc(100vh - 400px) !important;
+ }
}
::v-deep(.el-tabs) {
height: 100%;
--
Gitblit v1.9.3