From 99d66df3dc762d85afe5c33329d2b757537671bd Mon Sep 17 00:00:00 2001 From: xlzy <1017866168@qq.com> Date: Sun, 26 Mar 2023 13:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=9B=B4=E6=96=B0=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BF=AE=E6=94=B9=E5=88=86=E9=A1=B5=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=EF=BC=8C=E5=88=B7=E6=96=B0=E8=A1=A8=E6=A0=BC=E6=97=B6=E4=BC=A0?= =?UTF-8?q?=E9=80=92=E7=9A=84pageSize=E5=8F=82=E6=95=B0=E4=B8=8D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- snowy-admin-web/src/components/Table/index.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/snowy-admin-web/src/components/Table/index.vue b/snowy-admin-web/src/components/Table/index.vue index d54e9443..29c9233e 100644 --- a/snowy-admin-web/src/components/Table/index.vue +++ b/snowy-admin-web/src/components/Table/index.vue @@ -6,6 +6,7 @@ import './index.less' export default { + name: 'STable', components: { draggable, columnSetting @@ -42,8 +43,8 @@ default: 1 }, size: { - type: String, - default: '10' + type: Number, + default: 10 }, showSizeChanger: { type: Boolean, @@ -143,7 +144,7 @@ (['auto', true].includes(this.showPagination) && Object.assign({}, this.localPagination, { current: localPageNum, - size: this.size, //this.compSize, size// 改动 + pageSize: this.size, //this.compSize, size// 改动 showSizeChanger: this.showSizeChanger, defaultPageSize: this.defaultPageSize, pageSizeOptions: this.pageSizeOptions, @@ -168,7 +169,7 @@ {}, { current: 1, - size: this.size + pageSize: this.localPagination.pageSize } )) this.loadData() @@ -187,11 +188,12 @@ (pagination && pagination.current) || (this.showPagination && this.localPagination.current) || this.pageNum, + // 此处后端使用size作为分页参数 size: (pagination && pagination.pageSize) || (this.showPagination && this.localPagination.pageSize) || this.pageSize || - this.localPagination.size + this.localPagination.pageSize }, (sorter && sorter.field && { @@ -227,7 +229,7 @@ showTotal: (total, range) => { return `${range[0]}-${range[1]} 共 ${total} 条 ` }, - size: (pagination && pagination.size) || this.localPagination.size + pageSize: (pagination && pagination.pageSize) || this.localPagination.pageSize })) || false // 后端数据records为null保存修复