|
|
@@ -32,7 +32,6 @@ export function useTableScroll({
|
|
|
const { bottomIncludeBody } = getViewportOffset(headEl)
|
|
|
const tableContainerEl: HTMLElement = tableElRef.current?.querySelector('.ant-table-container')
|
|
|
if (!tableContainerEl) return
|
|
|
-
|
|
|
let paddingHeight = 24
|
|
|
|
|
|
let paginationHeight = 0
|
|
|
@@ -92,9 +91,14 @@ export function useTableScroll({
|
|
|
|
|
|
tbodyEl && (tbodyEl!.style.height = notDataHeight)
|
|
|
return
|
|
|
+ } else {
|
|
|
+ // TODO:有可能已经设置过tbody.ant-table-tbody要归0
|
|
|
+ const tbodyEl: HTMLElement = tableContainerEl?.querySelector('tbody.ant-table-tbody')
|
|
|
+ if (tbodyEl?.style?.height) {
|
|
|
+ tbodyEl.style.height = 'unset'
|
|
|
+ }
|
|
|
}
|
|
|
const tbodyEl: HTMLElement = tableContainerEl?.children[1]
|
|
|
-
|
|
|
tbodyEl && (tbodyEl!.style.height = `${height}px`)
|
|
|
}
|
|
|
|