guy 4 years ago
parent
commit
6b06a8e615
  1. 9
      src/core/widget.js

9
src/core/widget.js

@ -233,23 +233,16 @@
} }
lifeHook !== false && callLifeHook(this, "beforeMount"); lifeHook !== false && callLifeHook(this, "beforeMount");
this._isMounted = true; this._isMounted = true;
// this._mountChildren && this._mountChildren();
BI.each(this._children, function (i, widget) { BI.each(this._children, function (i, widget) {
!self.isEnabled() && widget._setEnable(false); !self.isEnabled() && widget._setEnable(false);
!self.isValid() && widget._setValid(false); !self.isValid() && widget._setValid(false);
widget._mount && widget._mount(deep ? force : false, deep, lifeHook, predicate); widget._mount && widget._mount(deep ? force : false, deep, lifeHook, predicate);
}); });
this._mountChildren && this._mountChildren(); this._mountChildren && this._mountChildren();
this.__afterMount(lifeHook, predicate);
return true;
},
__afterMount: function (lifeHook, predicate) {
if (this._isMounted) {
lifeHook !== false && callLifeHook(this, "mounted"); lifeHook !== false && callLifeHook(this, "mounted");
this.fireEvent(BI.Events.MOUNT); this.fireEvent(BI.Events.MOUNT);
predicate && predicate(this); predicate && predicate(this);
} return true;
}, },
_mountChildren: null, _mountChildren: null,

Loading…
Cancel
Save