From f84206bff0aed9c28a4de03a8f4d30722596bfbc Mon Sep 17 00:00:00 2001 From: Xu Zhimeng Date: Fri, 17 Sep 2021 13:45:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dshow-summary=E3=80=81f?= =?UTF-8?q?ixed=E5=90=8C=E6=97=B6=E5=AD=98=E5=9C=A8=EF=BC=8C=E4=B8=94max-h?= =?UTF-8?q?eight=E8=AE=BE=E7=BD=AE=E7=9A=84=E6=AF=94=E5=AE=9E=E9=99=85?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E9=AB=98=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C?= =?UTF-8?q?=E5=90=88=E8=AE=A1=E8=A2=AB=E9=A1=B6=E5=87=BA=E5=8E=BB=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/table/table.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/table/table.vue b/src/components/table/table.vue index 1ac90c47..ef14b503 100644 --- a/src/components/table/table.vue +++ b/src/components/table/table.vue @@ -497,7 +497,12 @@ let style = {}; if (this.bodyHeight !== 0) { let height = this.bodyHeight - (this.showHorizontalScrollBar?this.scrollBarWidth:0); - style.height = this.showHorizontalScrollBar ? `${height}px` : `${height - 1}px`; + if(this.height) { + style.height = this.showHorizontalScrollBar ? `${height}px` : `${height - 1}px`; + } else if (this.maxHeight) { + style.maxHeight = this.showHorizontalScrollBar ? `${height}px` : `${height - 1}px`; + } + } return style; },