Browse Source

Pull request #3535: BI-126065 && BI-125791

Merge in VISUAL/fineui from ~DAILER/fineui:es6 to es6

* commit '6b711bc1e37ee7b5288b5c3e6567c8bc07d0657f':
  BI-125791 fix: 【6.0.10发散】组件编辑界面,点击触发数据解释的热区后,按钮显示的位置会变来变去
  BI-126065 fix: 【6.0.10】低版本火狐浏览器打开工程界面空白,控制台有报错
es6
Dailer-刘荣歆 2 years ago
parent
commit
41b64c5093
  1. 50
      packages/fineui/src/base/combination/combo.js
  2. 5
      packages/fineui/webpack/webpack.prod.js

50
packages/fineui/src/base/combination/combo.js

@ -267,34 +267,34 @@ export class Combo extends Bubble {
belowMouse && isNotNull(e)
? {
element: {
0: e.target,
offset: () => {
0: extend({}, e.target, {
getBoundingClientRect: function () {
return {
left: e.pageX,
top: e.pageY,
width: 0,
height: 0,
};
}
}),
offset: function () {
return {
left: e.pageX,
top: e.pageY,
};
},
bounds: () => {
// offset为其相对于父定位元素的偏移
return {
x: e.offsetX,
y: e.offsetY,
width: 0,
height: 24,
};
},
outerWidth: () => 0,
outerHeight: () => 24,
},
}
: this.combo;
const positionRelativeElement = supportCSSTransform
? DOM.getPositionRelativeContainingBlock(
isNull(container)
? this.element[0]
: Widget._renderEngine.createElement(isFunction(container) ? container() : container)[0]
)
: null;
const positionRelativeElement = DOM.getPositionRelativeContainingBlock(
isNull(container)
? this.element[0]
: BI.isWidget(container)
? container.element[0]
: BI.Widget._renderEngine.createElement(isFunction(container) ? container() : container)[0]
);
const TRIANGLE_LENGTH = 12;
switch (direction) {
case "bottom":
@ -513,8 +513,14 @@ export class Combo extends Bubble {
const scaleX = positonedRect.width / positionRelativeElement.offsetWidth;
const scaleY = positonedRect.height / positionRelativeElement.offsetHeight;
p.top && (p.top = p.top / scaleY);
p.left && (p.left = p.left / scaleX);
p.top && (p.top = Math.round(p.top / scaleY + positionRelativeElement.scrollTop));
p.left && (p.left = Math.round(p.left / scaleX + positionRelativeElement.scrollLeft));
p.adaptHeight && (p.adaptHeight = Math.round(p.adaptHeight / scaleY));
}
if ("adaptHeight" in p) {
this.resetListHeight(p.adaptHeight);
}
if ("left" in p) {

5
packages/fineui/webpack/webpack.prod.js

@ -5,6 +5,7 @@ const attachments = require("./attachments");
module.exports = merge(common, {
mode: "production",
target: ["web", "es5"],
entry: {
"fineui.min": attachments.fineui,
@ -14,8 +15,8 @@ module.exports = merge(common, {
output: {
path: dirs.DEST,
filename: "[name].js",
filename: "[name].js"
},
devtool: "hidden-source-map",
devtool: "hidden-source-map"
});

Loading…
Cancel
Save