diff --git a/packages/amis/src/renderers/Table/index.tsx b/packages/amis/src/renderers/Table/index.tsx index d8ef56bd5..ef691e9f5 100644 --- a/packages/amis/src/renderers/Table/index.tsx +++ b/packages/amis/src/renderers/Table/index.tsx @@ -861,9 +861,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;