mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix(components): [table] add missing append height (#12676)
This commit is contained in:
@@ -23,6 +23,7 @@ interface TableRefs {
|
||||
fixedBodyWrapper: HTMLElement
|
||||
rightFixedBodyWrapper: HTMLElement
|
||||
bodyWrapper: HTMLElement
|
||||
appendWrapper: HTMLElement
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ function useStyle<T>(
|
||||
const bodyScrollHeight = ref(0)
|
||||
const headerScrollHeight = ref(0)
|
||||
const footerScrollHeight = ref(0)
|
||||
const appendScrollHeight = ref(0)
|
||||
|
||||
watchEffect(() => {
|
||||
layout.setHeight(props.height)
|
||||
@@ -243,10 +244,12 @@ function useStyle<T>(
|
||||
tableScrollHeight.value = table.refs.tableWrapper?.scrollHeight || 0
|
||||
headerScrollHeight.value = tableHeader?.scrollHeight || 0
|
||||
footerScrollHeight.value = table.refs.footerWrapper?.offsetHeight || 0
|
||||
appendScrollHeight.value = table.refs.appendWrapper?.offsetHeight || 0
|
||||
bodyScrollHeight.value =
|
||||
tableScrollHeight.value -
|
||||
headerScrollHeight.value -
|
||||
footerScrollHeight.value
|
||||
footerScrollHeight.value -
|
||||
appendScrollHeight.value
|
||||
|
||||
if (shouldUpdateLayout) {
|
||||
resizeState.value = {
|
||||
|
||||
Reference in New Issue
Block a user