mirror of https://github.com/jeecgboot/jeecg-boot
【issues/7422】BasicTable列表canResize属性为true时合计行不能横向滚动
parent
b5b667058b
commit
b16fdef8dc
|
@ -38,24 +38,34 @@ export function useTableFooter(
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleSummary() {
|
function handleSummary() {
|
||||||
const { showSummary } = unref(propsRef);
|
const { showSummary, canResize } = unref(propsRef);
|
||||||
if (!showSummary || unref(getIsEmptyData)) return;
|
if (!showSummary || unref(getIsEmptyData)) return;
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
const tableEl = unref(tableElRef);
|
const tableEl = unref(tableElRef);
|
||||||
if (!tableEl) return;
|
if (!tableEl) return;
|
||||||
const bodyDom = tableEl.$el.querySelector('.ant-table-content');
|
let bodyDom;
|
||||||
useEventListener({
|
// update-begin--author:liaozhiyang---date:20241111---for:【issues/7422】BasicTable列表canResize属性为true时合计行不能横向滚动
|
||||||
el: bodyDom,
|
if (canResize) {
|
||||||
name: 'scroll',
|
setTimeout(() => {
|
||||||
listener: () => {
|
bodyDom = tableEl.$el.querySelector('.ant-table-body');
|
||||||
const footerBodyDom = tableEl.$el.querySelector('.ant-table-footer .ant-table-content') as HTMLDivElement;
|
}, 0);
|
||||||
if (!footerBodyDom || !bodyDom) return;
|
} else {
|
||||||
footerBodyDom.scrollLeft = bodyDom.scrollLeft;
|
bodyDom = tableEl.$el.querySelector('.ant-table-content');
|
||||||
},
|
}
|
||||||
wait: 0,
|
setTimeout(() => {
|
||||||
options: true,
|
useEventListener({
|
||||||
});
|
el: bodyDom,
|
||||||
|
name: 'scroll',
|
||||||
|
listener: () => {
|
||||||
|
const footerBodyDom = tableEl.$el.querySelector('.ant-table-footer .ant-table-content') as HTMLDivElement;
|
||||||
|
if (!footerBodyDom || !bodyDom) return;
|
||||||
|
footerBodyDom.scrollLeft = bodyDom.scrollLeft;
|
||||||
|
},
|
||||||
|
wait: 0,
|
||||||
|
options: true,
|
||||||
|
});
|
||||||
|
}, 0);
|
||||||
|
// update-end--author:liaozhiyang---date:20241111---for:【issues/7422】BasicTable列表canResize属性为true时合计行不能横向滚动
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return { getFooterProps };
|
return { getFooterProps };
|
||||||
|
|
Loading…
Reference in New Issue