Browse Source

整理代码

es6
guy 3 years ago
parent
commit
0650c8d617
  1. 10
      src/core/4.widget.js
  2. 13
      src/core/wrapper/layout/layout.absolute.js

10
src/core/4.widget.js

@ -568,13 +568,17 @@
this.element.empty();
},
// 默认的populate方法就是干掉重来
// 默认的reset方法就是干掉重来
reset: function () {
this.purgeListeners();
// 还在异步状态的不需要执行reset
if (this.__async === true || this.__asking === true) {
return;
}
// this.purgeListeners();
this.empty();
this._initCurrent();
this._init();
this._initRef();
// this._initRef();
},
_destroy: function () {

13
src/core/wrapper/layout/layout.absolute.js

@ -85,19 +85,6 @@ BI.AbsoluteLayout = BI.inherit(BI.Layout, {
this.stroke(this.options.items);
},
stroke: function (items) {
this.options.items = items || [];
var self = this;
BI.each(items, function (i, item) {
if (item) {
if (!BI.isWidget(item) && !item.el) {
throw new Error("el must be exist");
}
self._addElement(i, item);
}
});
},
populate: function (items) {
BI.AbsoluteLayout.superclass.populate.apply(this, arguments);
this._mount();

Loading…
Cancel
Save