Browse Source

context重构

es6
guy 4 years ago
parent
commit
1c9962bb70
  1. 2
      src/core/widget.js

2
src/core/widget.js

@ -338,7 +338,9 @@
throw new Error("name has already been existed"); throw new Error("name has already been existed");
} }
widget._setParent && widget._setParent(this); widget._setParent && widget._setParent(this);
BI.Widget.pushContext(widget);
widget._lazyConstructor(); widget._lazyConstructor();
BI.Widget.popContext();
widget.on(BI.Events.DESTROY, function () { widget.on(BI.Events.DESTROY, function () {
BI.remove(self._children, this); BI.remove(self._children, this);
}); });

Loading…
Cancel
Save