From f425ef0d689a312d0600a55097ad260cadfa87fc Mon Sep 17 00:00:00 2001 From: hejianhao <15708179461@qq.com> Date: 星期三, 02 四月 2025 14:29:09 +0800 Subject: [PATCH] 系统管理 --- src/components/TableSlot/index.vue | 24 +++++++++++++++++------- 1 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/components/TableSlot/index.vue b/src/components/TableSlot/index.vue index 10a3074..1aa22e9 100644 --- a/src/components/TableSlot/index.vue +++ b/src/components/TableSlot/index.vue @@ -1,13 +1,22 @@ <template> <div class="table-slot"> - <div class="search"> - <slot name="search"></slot> - </div> + <template v-if="$slots.setting"> + <div class="search"> + <slot name="search"></slot> + </div> + </template> <div class="table"> - <slot name="setting"></slot> - <Table :data="tableData" :total="total" :queryForm="queryForm" @currentChange="handleCurrentChange" @sizeChange="handleSizeChange"> - <slot name="table"></slot> - </Table> + <template v-if="$slots.setting"> + <div style="margin-bottom: 20px;"> + <slot name="setting"></slot> + </div> + </template> + <template v-if="$slots.table"> + <Table :data="tableData" :total="total" :queryForm="queryForm" @currentChange="handleCurrentChange" + @sizeChange="handleSizeChange"> + <slot name="table"></slot> + </Table> + </template> </div> </div> </template> @@ -54,6 +63,7 @@ display: flex; flex-direction: column; } + .search { padding: 34px 30px 15px 30px; box-shadow: 0px 10px 19px 0px rgba(0, 0, 0, 0.06); -- Gitblit v1.7.1