Browse Source

REPORT-119215 fix: 统一使用clientWidth和clientHeight,父页面代理掉子应用的body的clientHeight和clientWidth到父应用的body上

research/test
jian 7 months ago
parent
commit
27f84abf07
  1. 4
      packages/fineui/src/core/controller/controller.popover.js

4
packages/fineui/src/core/controller/controller.popover.js

@ -58,8 +58,8 @@ export class PopoverController extends Controller {
const popover = this.get(name);
popover.show && popover.show();
const render = this.getRender();
const elRect = Widget._renderEngine.createElement(render)[0].getBoundingClientRect();
const W = elRect.width, H = elRect.height;
const el = Widget._renderEngine.createElement(render)[0];
const W = el.clientWidth, H = el.clientHeight;
const w = popover.element.width(), h = popover.element.height();
let left = (W - w) / 2, top = (H - h) / 2;
if (left < 0) {

Loading…
Cancel
Save