mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-26 16:46:19 +08:00
fix: fix table auto height
This commit is contained in:
@@ -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
|
|||||||
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);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user