Browse Source

Merge pull request #186 in ~GUY/fineui from ~YOUNG/fineuig:master to master

* commit '43bd6a4dbaeb6118a0e97a7ee6d720fcf8fa59e4':
  BI-10727 布局问题
es6
Young 7 years ago
parent
commit
c07fb01906
  1. 26
      bi/widget.js
  2. 26
      dist/bundle.js
  3. 26
      dist/widget.js
  4. 26
      src/widget/arrangement/arrangement.js

26
bi/widget.js

@ -1083,12 +1083,21 @@ BI.Arrangement = BI.inherit(BI.Widget, {
}, },
_renderRegion: function () { _renderRegion: function () {
var self = this; var items = BI.toArray(this.regions);
BI.createWidget({ BI.each(items, function (i, item) {
type: "bi.absolute", if (BI.isNotNull(item.el)) {
element: this.container, item.el.options.key = item.id;
items: BI.toArray(this.regions) } else {
item.key = item.id;
}
}); });
if (BI.isNull(this.wrapper)) {
this.wrapper = BI.createWidget({
type: "bi.absolute",
element: this.container
});
}
this.wrapper.populate(items);
}, },
getClientWidth: function () { getClientWidth: function () {
@ -1380,6 +1389,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
} }
return out; return out;
function getStatics(layout) { function getStatics(layout) {
return BI.filter(layout, function (i, l) { return BI.filter(layout, function (i, l) {
return l._static; return l._static;
@ -1824,11 +1834,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
}, },
populate: function (items) { populate: function (items) {
var self = this; this.regions = {};
BI.each(this.regions, function (name, region) {
self.regions[name].el.setVisible(false);
delete self.regions[name];
});
this._populate(items); this._populate(items);
this._renderRegion(); this._renderRegion();
} }

26
dist/bundle.js vendored

@ -79583,12 +79583,21 @@ BI.Arrangement = BI.inherit(BI.Widget, {
}, },
_renderRegion: function () { _renderRegion: function () {
var self = this; var items = BI.toArray(this.regions);
BI.createWidget({ BI.each(items, function (i, item) {
type: "bi.absolute", if (BI.isNotNull(item.el)) {
element: this.container, item.el.options.key = item.id;
items: BI.toArray(this.regions) } else {
item.key = item.id;
}
}); });
if (BI.isNull(this.wrapper)) {
this.wrapper = BI.createWidget({
type: "bi.absolute",
element: this.container
});
}
this.wrapper.populate(items);
}, },
getClientWidth: function () { getClientWidth: function () {
@ -79880,6 +79889,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
} }
return out; return out;
function getStatics(layout) { function getStatics(layout) {
return BI.filter(layout, function (i, l) { return BI.filter(layout, function (i, l) {
return l._static; return l._static;
@ -80324,11 +80334,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
}, },
populate: function (items) { populate: function (items) {
var self = this; this.regions = {};
BI.each(this.regions, function (name, region) {
self.regions[name].el.setVisible(false);
delete self.regions[name];
});
this._populate(items); this._populate(items);
this._renderRegion(); this._renderRegion();
} }

26
dist/widget.js vendored

@ -1083,12 +1083,21 @@ BI.Arrangement = BI.inherit(BI.Widget, {
}, },
_renderRegion: function () { _renderRegion: function () {
var self = this; var items = BI.toArray(this.regions);
BI.createWidget({ BI.each(items, function (i, item) {
type: "bi.absolute", if (BI.isNotNull(item.el)) {
element: this.container, item.el.options.key = item.id;
items: BI.toArray(this.regions) } else {
item.key = item.id;
}
}); });
if (BI.isNull(this.wrapper)) {
this.wrapper = BI.createWidget({
type: "bi.absolute",
element: this.container
});
}
this.wrapper.populate(items);
}, },
getClientWidth: function () { getClientWidth: function () {
@ -1380,6 +1389,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
} }
return out; return out;
function getStatics(layout) { function getStatics(layout) {
return BI.filter(layout, function (i, l) { return BI.filter(layout, function (i, l) {
return l._static; return l._static;
@ -1824,11 +1834,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
}, },
populate: function (items) { populate: function (items) {
var self = this; this.regions = {};
BI.each(this.regions, function (name, region) {
self.regions[name].el.setVisible(false);
delete self.regions[name];
});
this._populate(items); this._populate(items);
this._renderRegion(); this._renderRegion();
} }

26
src/widget/arrangement/arrangement.js

@ -284,12 +284,21 @@ BI.Arrangement = BI.inherit(BI.Widget, {
}, },
_renderRegion: function () { _renderRegion: function () {
var self = this; var items = BI.toArray(this.regions);
BI.createWidget({ BI.each(items, function (i, item) {
type: "bi.absolute", if (BI.isNotNull(item.el)) {
element: this.container, item.el.options.key = item.id;
items: BI.toArray(this.regions) } else {
item.key = item.id;
}
}); });
if (BI.isNull(this.wrapper)) {
this.wrapper = BI.createWidget({
type: "bi.absolute",
element: this.container
});
}
this.wrapper.populate(items);
}, },
getClientWidth: function () { getClientWidth: function () {
@ -581,6 +590,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
} }
return out; return out;
function getStatics(layout) { function getStatics(layout) {
return BI.filter(layout, function (i, l) { return BI.filter(layout, function (i, l) {
return l._static; return l._static;
@ -1025,11 +1035,7 @@ BI.Arrangement = BI.inherit(BI.Widget, {
}, },
populate: function (items) { populate: function (items) {
var self = this; this.regions = {};
BI.each(this.regions, function (name, region) {
self.regions[name].el.setVisible(false);
delete self.regions[name];
});
this._populate(items); this._populate(items);
this._renderRegion(); this._renderRegion();
} }

Loading…
Cancel
Save