|
|
@ -133,7 +133,11 @@ |
|
|
|
BI.Widget.prototype._init = function () { |
|
|
|
BI.Widget.prototype._init = function () { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
var needPop = createStore.call(this); |
|
|
|
var needPop = createStore.call(this); |
|
|
|
|
|
|
|
try { |
|
|
|
_init.apply(this, arguments); |
|
|
|
_init.apply(this, arguments); |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
console.error(e); |
|
|
|
|
|
|
|
} |
|
|
|
needPop && popTarget(); |
|
|
|
needPop && popTarget(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
@ -145,13 +149,21 @@ |
|
|
|
pushTarget(this.store); |
|
|
|
pushTarget(this.store); |
|
|
|
initWatch(this, this.watch); |
|
|
|
initWatch(this, this.watch); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
_render.apply(this, arguments); |
|
|
|
_render.apply(this, arguments); |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
console.error(e); |
|
|
|
|
|
|
|
} |
|
|
|
needPop && popTarget(); |
|
|
|
needPop && popTarget(); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var unMount = BI.Widget.prototype.__d; |
|
|
|
var unMount = BI.Widget.prototype.__d; |
|
|
|
BI.Widget.prototype.__d = function () { |
|
|
|
BI.Widget.prototype.__d = function () { |
|
|
|
|
|
|
|
try { |
|
|
|
unMount.apply(this, arguments); |
|
|
|
unMount.apply(this, arguments); |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
console.error(e); |
|
|
|
|
|
|
|
} |
|
|
|
this.store && BI.isFunction(this.store.destroy) && this.store.destroy(); |
|
|
|
this.store && BI.isFunction(this.store.destroy) && this.store.destroy(); |
|
|
|
BI.each(this._watchers, function (i, unwatches) { |
|
|
|
BI.each(this._watchers, function (i, unwatches) { |
|
|
|
unwatches = BI.isArray(unwatches) ? unwatches : [unwatches]; |
|
|
|
unwatches = BI.isArray(unwatches) ? unwatches : [unwatches]; |
|
|
|