Просмотр исходного кода

fix: 无数据下取消body的padding-bottom值

lanjianrong 4 лет назад
Родитель
Сommit
c7eae31114
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/components/Table/src/hooks/useTableScroll.ts

+ 2 - 2
src/components/Table/src/hooks/useTableScroll.ts

@@ -76,8 +76,8 @@ export function useTableScroll({
 
     if (!dataSource?.length) {
       // TODO:针对无数据的情况下,特别设置tboody
-      tableContainerEl!.style.marginBottom = '16px'
-      tableContainerEl!.style.paddingBottom = '16px'
+      tableContainerEl!.style.marginBottom = '32px'
+      // tableContainerEl!.style.paddingBottom = '16px'
       const tbodyEl: HTMLElement = tableContainerEl?.querySelector('tbody.ant-table-tbody')
       const el = tableContainerEl?.querySelector('table')
       let hasScrollBar = el?.style.width !== '100%'