parent
b008c44246
commit
7ba83e71bf
|
|
@ -36,13 +36,13 @@ export function useTableFooter(
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
const tableEl = unref(tableElRef);
|
const tableEl = unref(tableElRef);
|
||||||
if (!tableEl) return;
|
if (!tableEl) return;
|
||||||
const bodyDom = tableEl.$el.querySelector('.ant-table-content');
|
const bodyDom = tableEl.$el.querySelector(' .ant-table-content, .ant-table-body');
|
||||||
useEventListener({
|
useEventListener({
|
||||||
el: bodyDom,
|
el: bodyDom,
|
||||||
name: 'scroll',
|
name: 'scroll',
|
||||||
listener: () => {
|
listener: () => {
|
||||||
const footerBodyDom = tableEl.$el.querySelector(
|
const footerBodyDom = tableEl.$el.querySelector(
|
||||||
'.ant-table-footer .ant-table-content',
|
'.ant-table-footer .ant-table-container [class^="ant-table-"]',
|
||||||
) as HTMLDivElement;
|
) as HTMLDivElement;
|
||||||
if (!footerBodyDom || !bodyDom) return;
|
if (!footerBodyDom || !bodyDom) return;
|
||||||
footerBodyDom.scrollLeft = bodyDom.scrollLeft;
|
footerBodyDom.scrollLeft = bodyDom.scrollLeft;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue