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. 24
      bi/widget.js
  2. 24
      dist/bundle.js
  3. 24
      dist/widget.js
  4. 24
      src/widget/arrangement/arrangement.js

24
bi/widget.js

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

24
dist/bundle.js vendored

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

24
dist/widget.js vendored

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

24
src/widget/arrangement/arrangement.js

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

Loading…
Cancel
Save