Merge pull request #969 from followfire/master

fix: 修复Table中show-summary、fixed同时存在,且max-height设置的比实际高度高的时候,合计被顶出去的问题
This commit is contained in:
Aresn 2021-09-17 14:59:22 +08:00 committed by GitHub
commit ef35c398c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -497,7 +497,9 @@
let style = {}; let style = {};
if (this.bodyHeight !== 0) { if (this.bodyHeight !== 0) {
let height = this.bodyHeight - (this.showHorizontalScrollBar?this.scrollBarWidth:0); let height = this.bodyHeight - (this.showHorizontalScrollBar?this.scrollBarWidth:0);
style.height = this.showHorizontalScrollBar ? `${height}px` : `${height - 1}px`; const bodyHeight = this.showHorizontalScrollBar ? `${height}px` : `${height - 1}px`;
if (this.height) style.height = bodyHeight;
else if (this.maxHeight) style.maxHeight = bodyHeight;
} }
return style; return style;
}, },