fix(table): fix fixed table height error when no data(#1332)

fix #1325

Co-authored-by: winerlu <winerlu@tencent.com>
This commit is contained in:
justwiner 2021-01-24 16:44:26 +08:00 committed by GitHub
parent 50525d5e5a
commit 80de9fc5e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,11 +159,8 @@ class TableLayout {
? this.bodyHeight.value - this.gutterWidth
: this.bodyHeight.value
const noData = !(
this.store.states.data.value && this.store.states.data.value.length
)
this.viewportHeight.value = this.scrollX.value
? tableHeight - (noData ? 0 : this.gutterWidth)
? tableHeight - this.gutterWidth
: tableHeight
this.updateScrollY()