提交 ddc3786b 作者: vben

fix: fix table auto height

上级 b8353fe1
...@@ -77,7 +77,7 @@ export function useTableScroll(refProps: ComputedRef<BasicTableProps>, tableElRe ...@@ -77,7 +77,7 @@ export function useTableScroll(refProps: ComputedRef<BasicTableProps>, tableElRe
if (el) { if (el) {
headerHeight = (el as HTMLElement).offsetHeight; headerHeight = (el as HTMLElement).offsetHeight;
} }
const tHeight = tableHeightRef.value =
bottomIncludeBody - bottomIncludeBody -
(resizeHeightOffset || 0) - (resizeHeightOffset || 0) -
paddingHeight - paddingHeight -
...@@ -86,7 +86,8 @@ export function useTableScroll(refProps: ComputedRef<BasicTableProps>, tableElRe ...@@ -86,7 +86,8 @@ export function useTableScroll(refProps: ComputedRef<BasicTableProps>, tableElRe
footerHeight - footerHeight -
headerHeight; headerHeight;
useTimeout(() => { useTimeout(() => {
tableHeightRef.value = tHeight > maxHeight! ? (maxHeight as number) : tableHeightRef.value; tableHeightRef.value =
tableHeightRef.value! > maxHeight! ? (maxHeight as number) : tableHeightRef.value;
cb && cb(); cb && cb();
}, 0); }, 0);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论