From 3bda92fd8561c8c9d2d95d1227e01a64e69110e5 Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 4 Jul 2022 14:32:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=BB=84=E4=BB=B6destory=E7=94=9F=E5=91=BD=E5=91=A8?= =?UTF-8?q?=E6=9C=9F,=E7=A1=AE=E4=BF=9D=E6=89=80=E6=9C=89=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E7=9A=84ref=E9=83=BD=E4=BC=9A=E8=A2=AB=E8=B0=83?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/3.ob.js | 6 +++--- src/core/4.widget.js | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/3.ob.js b/src/core/3.ob.js index 30b6ce536..9cf8fd3f9 100644 --- a/src/core/3.ob.js +++ b/src/core/3.ob.js @@ -1,5 +1,5 @@ !(function () { - function extend () { + function extend() { var target = arguments[0] || {}, length = arguments.length, i = 1, options, name, src, copy; for (; i < length; i++) { // Only deal with non-null/undefined values @@ -90,11 +90,11 @@ //释放当前对象 _purgeRef: function () { if (this.options.__ref) { - this.options.__ref.call(null); + this.options.__ref.call(null, null); this.options.__ref = null; } if (this.options.ref) { - this.options.ref.call(null); + this.options.ref.call(null, null); this.options.ref = null; } }, diff --git a/src/core/4.widget.js b/src/core/4.widget.js index 61b09a07b..b88487e3c 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -738,12 +738,13 @@ callLifeHook(this, "destroyed"); this.destroyed = null; this._isDestroyed = true; + this._purgeRef(); + this.purgeListeners(); }, _unMount: function () { this.__destroy(); this.fireEvent(BI.Events.UNMOUNT); - this.purgeListeners(); }, _empty: function () {