From 3876d9769d131286e73e06d9d3d09ff76ebc6fcf Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 18 Sep 2020 16:11:58 +0800 Subject: [PATCH] =?UTF-8?q?BI-73305=20fix:=20single=E9=94=80=E6=AF=81?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99title=E6=B2=A1=E6=9C=89=E7=A7=BB?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/single.js | 13 ++++++------- src/core/widget.js | 1 + 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/base/single/single.js b/src/base/single/single.js index 15504359f..a4c9c46b0 100644 --- a/src/base/single/single.js +++ b/src/base/single/single.js @@ -96,7 +96,7 @@ BI.Single = BI.inherit(BI.Widget, { clearTimeout(self.showTimeout); self.showTimeout = null; } - if(BI.isNull(self.hideTimeout)) { + if (BI.isNull(self.hideTimeout)) { self.hideTimeout = BI.delay(function () { if (BI.isNotNull(self.hideTimeout)) { self._hideTooltip(); @@ -176,7 +176,7 @@ BI.Single = BI.inherit(BI.Widget, { getTitle: function () { var title = this.options.title; - if(BI.isFunction(title)) { + if (BI.isFunction(title)) { return title(); } return title; @@ -184,7 +184,7 @@ BI.Single = BI.inherit(BI.Widget, { getWarningTitle: function () { var title = this.options.warningTitle; - if(BI.isFunction(title)) { + if (BI.isFunction(title)) { return title(); } return title; @@ -200,12 +200,11 @@ BI.Single = BI.inherit(BI.Widget, { return this.options.value; }, - _unMount: function () { - BI.Single.superclass._unMount.apply(this, arguments); - if(BI.isNotNull(this.showTimeout)) { + destroyed: function () { + if (BI.isNotNull(this.showTimeout)) { clearTimeout(this.showTimeout); this.showTimeout = null; } BI.Tooltips.remove(this.getName()); - } + }, }); \ No newline at end of file diff --git a/src/core/widget.js b/src/core/widget.js index df65ba7fd..78d5e7646 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -486,6 +486,7 @@ destroy: function () { this.__d(); this.element.destroy(); + this.fireEvent(BI.Events.UNMOUNT); this.fireEvent(BI.Events.DESTROY); this._purgeRef(); this.purgeListeners();