Browse Source

整理代码

es6
guy 3 years ago
parent
commit
5461ce76ba
  1. 14
      src/core/wrapper/layout/float/float.horizontal.js

14
src/core/wrapper/layout/float/float.horizontal.js

@ -29,12 +29,16 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
items: this._formatItems(o.items), items: this._formatItems(o.items),
vgap: o.vgap, vgap: o.vgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap bgap: o.bgap,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
}; };
} }
return { return {
type: "bi.inline", type: "bi.inline",
items: [{ items: [{
el: {
type: "bi.vertical", type: "bi.vertical",
ref: function (_ref) { ref: function (_ref) {
self.layout = _ref; self.layout = _ref;
@ -43,9 +47,13 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
vgap: o.vgap, vgap: o.vgap,
tgap: o.tgap, tgap: o.tgap,
bgap: o.bgap bgap: o.bgap
}
}], }],
horizontalAlign: o.horizontalAlign, horizontalAlign: o.horizontalAlign,
verticalAlign: o.verticalAlign verticalAlign: o.verticalAlign,
scrollx: o.scrollx,
scrolly: o.scrolly,
scrollable: o.scrollable
}; };
}, },
@ -53,6 +61,7 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
var o = this.options; var o = this.options;
return BI.map(items, function (i, item) { return BI.map(items, function (i, item) {
return { return {
el: {
type: "bi.inline_horizontal_adapt", type: "bi.inline_horizontal_adapt",
horizontalAlign: o.horizontalAlign, horizontalAlign: o.horizontalAlign,
items: [item], items: [item],
@ -60,6 +69,7 @@ BI.FloatHorizontalLayout = BI.inherit(BI.Layout, {
lgap: o.lgap, lgap: o.lgap,
rgap: o.rgap rgap: o.rgap
} }
};
}); });
}, },

Loading…
Cancel
Save