From ddc3786b168a2931200ef61cc68dd80a18d714cc Mon Sep 17 00:00:00 2001 From: vben <anncwb@126.com> Date: 星期三, 14 十月 2020 22:38:20 +0800 Subject: [PATCH] fix: fix table auto height --- src/components/Table/src/hooks/useTableScroll.ts | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Table/src/hooks/useTableScroll.ts b/src/components/Table/src/hooks/useTableScroll.ts index f99f6ab..eb01544 100644 --- a/src/components/Table/src/hooks/useTableScroll.ts +++ b/src/components/Table/src/hooks/useTableScroll.ts @@ -77,7 +77,7 @@ if (el) { headerHeight = (el as HTMLElement).offsetHeight; } - const tHeight = + tableHeightRef.value = bottomIncludeBody - (resizeHeightOffset || 0) - paddingHeight - @@ -86,7 +86,8 @@ footerHeight - headerHeight; useTimeout(() => { - tableHeightRef.value = tHeight > maxHeight! ? (maxHeight as number) : tableHeightRef.value; + tableHeightRef.value = + tableHeightRef.value! > maxHeight! ? (maxHeight as number) : tableHeightRef.value; cb && cb(); }, 0); } -- Gitblit v1.8.0