@ -44,7 +44,9 @@
var self = this, o = this.options;
this._initCombo();
// 延迟绑定事件,这样可以将自己绑定的事情优先执行
BI.nextTick(this._initPullDownAction.bind(this));
BI.nextTick(() => {
!this.isDestroyed() && this._initPullDownAction();
});
this.combo.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
if (self.isEnabled() && self.isValid()) {
if (type === BI.Events.EXPAND) {
@ -50,7 +50,9 @@
@ -26,7 +26,9 @@ BI.Expander = BI.inherit(BI.Widget, {
this._expanded = !!o.el.open;
this._initExpander();
this.expander.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
@ -26,7 +26,9 @@ BI.Switcher = BI.inherit(BI.Widget, {
this._initSwitcher();
this.switcher.on(BI.Controller.EVENT_CHANGE, function (type, value, obj) {
@ -49,7 +49,9 @@ BI.BasicButton = BI.inherit(BI.Single, {
this.setSelected(true);
}
BI.nextTick(this.bindEvent.bind(this));
!this.isDestroyed() && this.bindEvent();
BI.BasicButton.superclass._initRef.apply(this, arguments);
},
@ -346,6 +346,7 @@
_initState: function () {
this._isMounted = false;
this._isDestroyed = false;
__initWatch: function () {
@ -449,6 +450,10 @@
return this._isMounted;
isDestroyed: function () {
return this._isDestroyed;
setWidth: function (w) {
this.options.width = w;
this._initElementWidth();
@ -732,6 +737,7 @@
callLifeHook(this, "destroyed");
this.destroyed = null;
this._isDestroyed = true;
_unMount: function () {