Browse Source

整理代码

es6
guy 3 years ago
parent
commit
675c836f79
  1. 13
      src/core/wrapper/layout/fill/float.fill.horizontal.js

13
src/core/wrapper/layout/fill/float.fill.horizontal.js

@ -19,9 +19,6 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
this.populate(this.options.items);
},
resize: function () {
// console.log("填充布局不需要resize");
},
addItem: function (item) {
// do nothing
throw new Error("不能添加子组件");
@ -79,8 +76,12 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
}
var top = o.vgap + o.tgap + (item.tgap || 0) + (item.vgap || 0),
bottom = o.vgap + o.bgap + (item.bgap || 0) + (item.vgap || 0);
if (BI.isNull(item.height)) {
w.element.css({
height: "calc(100% - " + ((top + bottom) / BI.pixRatio + BI.pixUnit) + ")"
});
}
w.element.css({
height: "calc(100% - " + ((top + bottom) / BI.pixRatio + BI.pixUnit) + ")",
position: "relative"
});
return w;
@ -123,6 +124,10 @@ BI.FloatHorizontalFillLayout = BI.inherit(BI.Layout, {
});
},
resize: function () {
// console.log("填充布局不需要resize");
},
update: function (opt) {
return this.forceUpdate(opt);
},

Loading…
Cancel
Save