From b3a97e3b5f400e538bd2954d14abad81b9a4d291 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Wed, 5 Nov 2025 17:50:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=A0=B7=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TableModel2/index.vue | 262 +++++++-------------------- 1 file changed, 61 insertions(+), 201 deletions(-) diff --git a/src/components/TableModel2/index.vue b/src/components/TableModel2/index.vue index 25922ff..f8e727c 100644 --- a/src/components/TableModel2/index.vue +++ b/src/components/TableModel2/index.vue @@ -3,50 +3,18 @@
- - - - - + + + + + - - - - - + " /> + + + + - + 查询 - + 重置 @@ -116,26 +52,15 @@ - + -
+
@@ -146,83 +71,38 @@
- - - + + + - - + + - + @@ -256,7 +132,7 @@ export default { // 列表请求接口 requestApi: { type: Function, - default: () => function () {}, + default: () => function () { }, }, // 列表配置项 columnsList: { @@ -366,9 +242,8 @@ export default { const baseHeight = this.showSearch ? 200 : 120 // 搜索区域高度 const toolbarHeight = this.showRightTools ? 40 : 0 // 工具栏高度 const paginationHeight = 60 // 分页区域高度 - const availableHeight = `calc(100vh - ${ - baseHeight + toolbarHeight + paginationHeight + 25 - }px)` + const availableHeight = `calc(100vh - ${baseHeight + toolbarHeight + paginationHeight + 25 + }px)` return { height: availableHeight, display: 'flex', @@ -377,12 +252,7 @@ export default { }, /* 表格容器样式 */ tableContainerStyle() { - return { - flex: 1, - overflow: 'hidden', - display: 'flex', - flexDirection: 'column', - } + return {} }, }, watch: { @@ -420,7 +290,7 @@ export default { // 是否显示复选框 selectionShow: true, // 是否显示序号 - + // 是否显示操作列 handleShow: true, // 列表每列 label @@ -603,7 +473,7 @@ export default { this.$set(setObj, 'unitName', res.data.unitName) this.$set(setObj, 'typeName', res.data.name) }) - .catch((err) => {}) + .catch((err) => { }) for (let key in this.queryParams) { this.$set(setObj, key, this.queryParams[key]) } @@ -774,7 +644,6 @@ export default { .table-card { ::v-deep .el-card__body { padding: 20px; - height: 100%; display: flex; flex-direction: column; } @@ -801,24 +670,11 @@ export default { // 新增表格容器样式 .table-container { - flex: 1; - overflow: hidden; - display: flex; - flex-direction: column; - min-height: 0; // 确保容器可以收缩 + width: 100%; ::v-deep .el-table { - flex: 1; - height: 100%; width: 100%; margin-bottom: 0; - - // 确保表格体可以滚动 - .el-table__body-wrapper { - overflow-x: auto; - overflow-y: auto; - max-height: 100%; - } } } @@ -902,4 +758,8 @@ export default { } } } + +::v-deep .pagination-container { + margin-top: 0; +}