fix: table-misaligned when frozen columns (#140)

This commit is contained in:
Pithy 2023-04-17 11:25:25 +08:00 committed by GitHub
parent 3f0adf5dbe
commit e5ee94b639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -924,6 +924,11 @@ const Methods = {
rightBody && (rightBody.$el.scrollTop = top)
}
},
//同步headerHeight
syncHeaderHeight() {
let headerEl = this.$refs.tableHeader?.$el
if (headerEl) this.headerHeight = headerEl.offsetHeight
},
updateStyle() {
let { $refs, columnStore, currentRow, height, maxHeight, minHeight, parentHeight, tableColumn } = this
let containerList = ['main', 'left', 'right']
@ -952,6 +957,8 @@ const Methods = {
})
currentRow && this.setCurrentRow(currentRow)
this.syncFixedTop()
// Fixed issue #129
this.syncHeaderHeight()
return this.$nextTick()
},
// 处理固定列的显示状态