From d48599e23a0bf8e1fa4365963fa5ee7b4ae452aa Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 8 Mar 2021 21:03:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=BB=84=E4=BB=B6=E9=BB=98?= =?UTF-8?q?=E8=AE=A4populate=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/widget.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/widget.js b/src/core/widget.js index a7017c403..82f8fd9f5 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -559,6 +559,13 @@ this.element.empty(); }, + // 默认的populate方法就是干掉重来 + populate: function () { + this.empty(); + this.purgeListeners(); + this._init(); + }, + _destroy: function () { this.__d(); this.element.destroy();