From e25caadcef5758b8fd027ab5e39929ea6324ce99 Mon Sep 17 00:00:00 2001 From: init-qy <59350883+init-qy@users.noreply.github.com> Date: Sat, 3 Jun 2023 11:03:55 +0800 Subject: [PATCH] fix(components): [table] add missing append height (#12676) --- packages/components/table/src/table/defaults.ts | 1 + packages/components/table/src/table/style-helper.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/components/table/src/table/defaults.ts b/packages/components/table/src/table/defaults.ts index 09f0ebf999..4c6676b575 100644 --- a/packages/components/table/src/table/defaults.ts +++ b/packages/components/table/src/table/defaults.ts @@ -23,6 +23,7 @@ interface TableRefs { fixedBodyWrapper: HTMLElement rightFixedBodyWrapper: HTMLElement bodyWrapper: HTMLElement + appendWrapper: HTMLElement [key: string]: any } diff --git a/packages/components/table/src/table/style-helper.ts b/packages/components/table/src/table/style-helper.ts index 6e9f737d45..cced5aa024 100644 --- a/packages/components/table/src/table/style-helper.ts +++ b/packages/components/table/src/table/style-helper.ts @@ -47,6 +47,7 @@ function useStyle( 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( 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 = {