|
|
@@ -68,7 +68,7 @@ export function useTableScroll({
|
|
|
// TODO: 在已经设置过style的情况下才要取消掉style
|
|
|
// tableContainerEl!.removeAttribute('style')
|
|
|
tableContainerEl!.style.borderBottom = 'none'
|
|
|
- paddingHeight += 16
|
|
|
+ !tableContainerEl!.style.marginBottom && (paddingHeight += 16)
|
|
|
}
|
|
|
|
|
|
let headerHeight = 0
|
|
|
@@ -82,7 +82,7 @@ export function useTableScroll({
|
|
|
if (!dataSource?.length) {
|
|
|
// TODO:针对无数据的情况下,特别设置tboody
|
|
|
tableContainerEl!.style.marginBottom = '16px'
|
|
|
- const tbodyEl: HTMLElement = tableContainerEl?.querySelector('.ant-table-tbody')
|
|
|
+ const tbodyEl: HTMLElement = tableContainerEl?.querySelector('tbody.ant-table-tbody')
|
|
|
const el = tableContainerEl?.querySelector('table')
|
|
|
let hasScrollBar = el?.style.width !== '100%'
|
|
|
|
|
|
@@ -98,6 +98,7 @@ export function useTableScroll({
|
|
|
return
|
|
|
}
|
|
|
const tbodyEl: HTMLElement = tableContainerEl?.children[1]
|
|
|
+
|
|
|
tbodyEl && (tbodyEl!.style.height = `${height}px`)
|
|
|
}
|
|
|
|