fix(components): [el-table] improve scrollable condition (#5149)

This commit is contained in:
msidolphin 2022-01-07 16:36:31 +08:00 committed by GitHub
parent c24bebbe5d
commit ab783fa8d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,8 +90,7 @@ class TableLayout<T> {
if (this.bodyHeight.value === null) {
scrollY = false
} else {
const body = bodyWrapper.querySelector('.el-table__body') as HTMLElement
scrollY = body.offsetHeight > this.bodyHeight.value
scrollY = bodyWrapper.scrollHeight > this.bodyHeight.value
}
this.scrollY.value = scrollY
return prevScrollY !== scrollY