diff --git a/dist/fix/fix.compact.js b/dist/fix/fix.compact.js index 88148367c..b8e49eb28 100644 --- a/dist/fix/fix.compact.js +++ b/dist/fix/fix.compact.js @@ -105,6 +105,10 @@ if (workerMode && this._worker) { return; } + if (this.store) { + pushTarget(this.store); + return true; + } if (this._store) { var store = findStore(this.options.context || this._parent || this.options.element || this._context); if (store) { @@ -150,8 +154,8 @@ } }; - var unMount = BI.Widget.prototype.__d; - BI.Widget.prototype.__d = function () { + var unMount = BI.Widget.prototype.__destroy; + BI.Widget.prototype.__destroy = function () { try { unMount.apply(this, arguments); } catch (e) { diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 395e7c51a..9cc9cb901 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -756,12 +756,20 @@ // } // this._isMounted = false; // this.purgeListeners(); + + // 去掉组件绑定的watcher + BI.each(this._watchers, function (i, unwatches) { + unwatches = BI.isArray(unwatches) ? unwatches : [unwatches]; + BI.each(unwatches, function (j, unwatch) { + unwatch(); + }); + }); + this._watchers && (this._watchers = []); this.__d(); this.element.empty(); this.element.unbind(); this._initCurrent(); this._init(); - this._mount(); // this._initRef(); },