Browse Source

Pull request #275547: BI-148103 fix: 6.0.18过滤组件下拉框异常变小

Merge in DEC/fineui from ~ZOEY.CHEN/fineui_:feature/x to feature/x

* commit '74ccf2f8cc678319e8883737ccb921eb5ac77a12':
  BI-148103 fix: 6.0.18过滤组件下拉框异常变小
master^2^2
Zoey.Chen-陈泽语 8 months ago
parent
commit
e8f7a6c60b
  1. 9
      packages/fineui/src/core/utils/dom.js

9
packages/fineui/src/core/utils/dom.js

@ -744,10 +744,11 @@ export function getComboPosition(combo, popup, extraWidth, extraHeight, needAdap
if (needAdaptHeight === true && popup.resetHeight) {
const comboRect = combo.element[0].getBoundingClientRect();
const relativeOffset = positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0;
if (position.top < comboRect.top) {
popup.resetHeight(Math.min(viewportBounds.height - position.top - relativeOffset, comboRect.top, maxHeight));
} else if (position.top >= comboRect.bottom) {
popup.resetHeight(Math.min(viewportBounds.height - position.top - relativeOffset, viewportBounds.height - comboRect.bottom, maxHeight));
const positionTop = position.top + relativeOffset;
if (positionTop < comboRect.top) {
popup.resetHeight(Math.min(viewportBounds.height - positionTop, comboRect.top, maxHeight));
} else if (positionTop >= comboRect.bottom) {
popup.resetHeight(Math.min(viewportBounds.height - positionTop, viewportBounds.height - comboRect.bottom, maxHeight));
}
}

Loading…
Cancel
Save