From 864b1d4b3491879c5238a0f5231fa1066ff1d626 Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 6 Mar 2022 19:24:59 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/4.widget.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/4.widget.js b/src/core/4.widget.js index b396acf1e..119afda59 100644 --- a/src/core/4.widget.js +++ b/src/core/4.widget.js @@ -712,7 +712,10 @@ }, _empty: function () { - this.__d(); + BI.each(this._children, function (i, widget) { + widget && widget._unMount && widget._unMount(); + }); + this._children = {}; this.element.empty(); }, @@ -741,7 +744,8 @@ // } // this._isMounted = false; // this.purgeListeners(); - this._empty(); + this.__d(); + this.element.empty(); this.element.unbind(); this._initCurrent(); this._init();