From dad44b84ab21f9d1f860760a045015f1cab0aaec Mon Sep 17 00:00:00 2001 From: zrlibs <jesting_rr@163.com> Date: 星期三, 19 三月 2025 10:57:14 +0800 Subject: [PATCH] fixed --- src/components/examples/data-table.vue | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/src/components/examples/data-table.vue b/src/components/examples/data-table.vue index e72e957..d2db141 100644 --- a/src/components/examples/data-table.vue +++ b/src/components/examples/data-table.vue @@ -5,11 +5,15 @@ :row-class-name="() => ['no-wrap', 'col-gap-none']" :columns="columns" :data="data" - :height="tableHeight - 70" + :height="paged ? tableHeight - 70 : tableHeight" border + :highlight-row="highlightRow" + @on-current-change="onCurrentChange" + @on-selection-change="onSelectionChange" ref="refTable" ></Table> <Page + v-if="paged" class="text-center" :model-value="page" :total="total" @@ -25,6 +29,7 @@ @on-next="onNext" ref="refPage" /> + <Spin fix :show="loading" /> </div> </template> @@ -34,6 +39,10 @@ name: "DataTable", props: { tableHeight: Number | String, + paged: { + type: Boolean, + default: () => true, + }, columns: { type: Array, default: () => [], @@ -58,6 +67,8 @@ type: Array, default: () => [10, 20, 30, 40], }, + loading: Boolean, + highlightRow: Boolean, }, data() { return {}; @@ -127,6 +138,8 @@ <style lang="less" scoped> .data-table { + height: 100%; + position: relative; .text-center { text-align: center; } -- Gitblit v1.9.1