Browse Source

BI-30745 操控class来实现ie hack

es6
Zhenfei.Li 6 years ago
parent
commit
7eb5127bd4
  1. 11
      src/base/pane.js
  2. 10
      src/less/base/pane.less

11
src/base/pane.js

@ -74,25 +74,20 @@ BI.Pane = BI.inherit(BI.Widget, {
width: 5
}]
});
var loadingGif = BI.createWidget({
type: "bi.layout",
cls: "loading-background",
height: 30
});
var loadingEffect = (BI.isIE() && BI.getIEVersion() < 10) ? loadingGif : loadingAnimation;
(BI.isIE() && BI.getIEVersion() < 10) && loadingAnimation.element.addClass("hack");
if (o.overlap === true) {
if (!BI.Layers.has(this.getName())) {
BI.createWidget({
type: "bi.absolute_center_adapt",
items: [{
el: loadingEffect
el: loadingAnimation
}],
element: BI.Layers.make(this.getName(), this)
});
}
BI.Layers.show(self.getName());
} else if (BI.isNull(this._loading)) {
this._loading = loadingEffect;
this._loading = loadingAnimation;
this._loading.element.css("zIndex", 1);
BI.createWidget({
type: "bi.absolute_center_adapt",

10
src/less/base/pane.less

@ -1,4 +1,5 @@
@import "../index";
@import "../resource/background";
.bi-pane {
min-height: 25px;
.background-color(@color-bi-background-normal, 0);
@ -17,12 +18,17 @@
.animation-delay(-0.4s);
}
.keyframes (loading-widget, {
0%,
100% {
0%, 100% {
.transform (scaleY(0.3));
}
50% {
.transform (scaleY(1));
}
});
&.hack {
.loading-background;
div {
.background-color(@background-color-highlight, 0%);
}
}
}
Loading…
Cancel
Save