松鼠
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
src/components/Table/src/hooks/useTableFooter.ts
|
|
|
@ -36,13 +36,13 @@ export function useTableFooter( |
|
|
|
nextTick(() => { |
|
|
|
const tableEl = unref(tableElRef); |
|
|
|
if (!tableEl) return; |
|
|
|
const bodyDom = tableEl.$el.querySelector('.ant-table-content'); |
|
|
|
const bodyDom = tableEl.$el.querySelector(' .ant-table-content, .ant-table-body'); |
|
|
|
useEventListener({ |
|
|
|
el: bodyDom, |
|
|
|
name: 'scroll', |
|
|
|
listener: () => { |
|
|
|
const footerBodyDom = tableEl.$el.querySelector( |
|
|
|
'.ant-table-footer .ant-table-content', |
|
|
|
'.ant-table-footer .ant-table-container [class^="ant-table-"]', |
|
|
|
) as HTMLDivElement; |
|
|
|
if (!footerBodyDom || !bodyDom) return; |
|
|
|
footerBodyDom.scrollLeft = bodyDom.scrollLeft; |
|
|
|
|