From c9a68fa87c541bbe58d76a311b2fb204567720d7 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 9 Feb 2022 12:11:22 +0800 Subject: [PATCH 1/3] =?UTF-8?q?listeners=E6=94=AF=E6=8C=81object=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/3.ob.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/3.ob.js b/src/core/3.ob.js index 9eab5d35a..808488a76 100644 --- a/src/core/3.ob.js +++ b/src/core/3.ob.js @@ -62,7 +62,11 @@ _initListeners: function () { var self = this; if (this.options.listeners != null) { - _.each(this.options.listeners, function (lis) { + _.each(this.options.listeners, function (lis, eventName) { + if (_.isFunction(lis)) { + self.on(eventName, _.bind(lis, self)); + return; + } (lis.target ? lis.target : self)[lis.once ? "once" : "on"] (lis.eventName, _.bind(lis.action, self)); }); From 8064bfa49ce01a9770f161f4309d066cd9bfa8f9 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 9 Feb 2022 12:15:59 +0800 Subject: [PATCH 2/3] update --- src/core/3.ob.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/3.ob.js b/src/core/3.ob.js index 808488a76..6eb2b53cd 100644 --- a/src/core/3.ob.js +++ b/src/core/3.ob.js @@ -64,11 +64,10 @@ if (this.options.listeners != null) { _.each(this.options.listeners, function (lis, eventName) { if (_.isFunction(lis)) { - self.on(eventName, _.bind(lis, self)); + self.on(eventName, lis); return; } - (lis.target ? lis.target : self)[lis.once ? "once" : "on"] - (lis.eventName, _.bind(lis.action, self)); + (lis.target ? lis.target : self)[lis.once ? "once" : "on"](lis.eventName, lis.action); }); delete this.options.listeners; } From 18de5ac802abd4aca687ba90221dc81a0a87cc98 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 9 Feb 2022 13:01:06 +0800 Subject: [PATCH 3/3] update --- src/case/combo/bubblecombo/popup.bubble.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/case/combo/bubblecombo/popup.bubble.js b/src/case/combo/bubblecombo/popup.bubble.js index fdcba8144..c4514128e 100644 --- a/src/case/combo/bubblecombo/popup.bubble.js +++ b/src/case/combo/bubblecombo/popup.bubble.js @@ -31,7 +31,7 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, { buttons: [{ value: false, text: BI.i18nText("BI-Basic_Cancel"), - ghost: true + level: "ignore" }, { text: BI.i18nText(BI.i18nText("BI-Basic_OK")), value: true