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

10
src/less/base/pane.less

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