未验证 提交 0f50e045 编写于 作者: B BlackTooth 提交者: GitHub

fix(useTableFooter): not synchronization scroll bug (#2022)

Co-authored-by: N隆杰 <longjie.li@taxsoyea.net>
上级 4730b3af
......@@ -36,14 +36,13 @@ export function useTableFooter(
nextTick(() => {
const tableEl = unref(tableElRef);
if (!tableEl) return;
const bodyDomList = tableEl.$el.querySelectorAll('.ant-table-body');
const bodyDom = bodyDomList[0];
const bodyDom = tableEl.$el.querySelector('.ant-table-content');
useEventListener({
el: bodyDom,
name: 'scroll',
listener: () => {
const footerBodyDom = tableEl.$el.querySelector(
'.ant-table-footer .ant-table-body',
'.ant-table-footer .ant-table-content',
) as HTMLDivElement;
if (!footerBodyDom || !bodyDom) return;
footerBodyDom.scrollLeft = bodyDom.scrollLeft;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册