diff --git a/packages/amis/src/renderers/Table/index.tsx b/packages/amis/src/renderers/Table/index.tsx index 2c15d8af2..240b4e37b 100644 --- a/packages/amis/src/renderers/Table/index.tsx +++ b/packages/amis/src/renderers/Table/index.tsx @@ -868,9 +868,14 @@ export default class Table extends React.Component { while (nextSibling) { const positon = getComputedStyle(nextSibling).position; if (positon !== 'absolute' && positon !== 'fixed') { - nextSiblingHeight += - nextSibling.offsetHeight + - getStyleNumber(nextSibling, 'margin-bottom'); + const rect1 = selfNode.getBoundingClientRect(); + const rect2 = nextSibling.getBoundingClientRect(); + + if (rect1.bottom <= rect2.top) { + nextSiblingHeight += + nextSibling.offsetHeight + + getStyleNumber(nextSibling, 'margin-bottom'); + } } nextSibling = nextSibling.nextElementSibling as HTMLElement;