Browse Source

BI-154253 fix: 点击报错

master
Jimmy.Chai 3 months ago
parent
commit
4b0f0a951b
  1. 2
      packages/fineui/src/core/utils/dom.js

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

@ -743,7 +743,7 @@ export function getComboPosition(combo, popup, extraWidth, extraHeight, needAdap
} }
if (needAdaptHeight === true && popup.resetHeight) { if (needAdaptHeight === true && popup.resetHeight) {
const comboRect = combo.element[0].getBoundingClientRect(); const comboRect = combo.element[0].getBoundingClientRect();
const scale = comboRect.height / combo.element.height(); const scale = comboRect.height === 0 ? 1 : comboRect.height / combo.element.height();
const relativeOffset = positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0; const relativeOffset = positionRelativeElement ? positionRelativeElement.getBoundingClientRect().top : 0;
const positionTop = position.top + relativeOffset; const positionTop = position.top + relativeOffset;
if (positionTop < comboRect.top) { if (positionTop < comboRect.top) {

Loading…
Cancel
Save