From 6ec3573b6e1194285af80201290457f82768623f Mon Sep 17 00:00:00 2001 From: "Jimmy.Chai" Date: Thu, 15 Jul 2021 23:42:17 +0800 Subject: [PATCH 1/3] =?UTF-8?q?BI-88584=20feat=EF=BC=9A=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/1.pane.js | 4 ++++ src/case/layer/pane.list.js | 2 ++ src/widget/multiselect/search/multiselect.search.loader.js | 2 +- src/widget/singleselect/search/singleselect.search.loader.js | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/base/1.pane.js b/src/base/1.pane.js index 3a49513f1..e8b8366ba 100644 --- a/src/base/1.pane.js +++ b/src/base/1.pane.js @@ -138,6 +138,10 @@ BI.Pane = BI.inherit(BI.Widget, { } }, + setTipText: function (text) { + this._tipText.setText(text); + }, + populate: function (items) { this.options.items = items || []; this.check(); diff --git a/src/case/layer/pane.list.js b/src/case/layer/pane.list.js index 1b6530355..2620a96f5 100644 --- a/src/case/layer/pane.list.js +++ b/src/case/layer/pane.list.js @@ -122,6 +122,8 @@ BI.ListPane = BI.inherit(BI.Pane, { return; } BI.ListPane.superclass.populate.apply(this, arguments); + var tipText = BI.get(arguments, [2], ''); + BI.isNotEmptyString(tipText) && BI.ListPane.superclass.setTipText.apply(this, [tipText]); this.button_group.populate.apply(this.button_group, arguments); }, diff --git a/src/widget/multiselect/search/multiselect.search.loader.js b/src/widget/multiselect/search/multiselect.search.loader.js index c32bbc0a3..c57d1e494 100644 --- a/src/widget/multiselect/search/multiselect.search.loader.js +++ b/src/widget/multiselect/search/multiselect.search.loader.js @@ -68,7 +68,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, { var json = self._filterValues(self.storeValue); firstItems = self._createItems(json); } - callback(firstItems.concat(self._createItems(ob.items)), keyword); + callback(firstItems.concat(self._createItems(ob.items)), keyword, ob.tipText); if (op.times === 1 && self.storeValue) { self.setValue(self.storeValue); } diff --git a/src/widget/singleselect/search/singleselect.search.loader.js b/src/widget/singleselect/search/singleselect.search.loader.js index d1f3b9b73..1ad33f9c1 100644 --- a/src/widget/singleselect/search/singleselect.search.loader.js +++ b/src/widget/singleselect/search/singleselect.search.loader.js @@ -64,7 +64,7 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, { var json = self._filterValues(self.storeValue); firstItems = self._createItems(json); } - callback(firstItems.concat(self._createItems(ob.items)), keyword || ""); + callback(firstItems.concat(self._createItems(ob.items)), keyword || "", ob.tipText); if (op.times === 1 && self.storeValue) { self.setValue(self.storeValue); } From 29582f1e7a5588b8d847016b3739b6caaf5dd89f Mon Sep 17 00:00:00 2001 From: "Jimmy.Chai" Date: Fri, 16 Jul 2021 10:10:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?BI-88584=20reafctor=EF=BC=9A=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/1.pane.js | 1 + src/case/layer/pane.list.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/base/1.pane.js b/src/base/1.pane.js index e8b8366ba..f37cd9f7a 100644 --- a/src/base/1.pane.js +++ b/src/base/1.pane.js @@ -139,6 +139,7 @@ BI.Pane = BI.inherit(BI.Widget, { }, setTipText: function (text) { + this._assertTip(); this._tipText.setText(text); }, diff --git a/src/case/layer/pane.list.js b/src/case/layer/pane.list.js index 2620a96f5..d65fb82f0 100644 --- a/src/case/layer/pane.list.js +++ b/src/case/layer/pane.list.js @@ -123,7 +123,7 @@ BI.ListPane = BI.inherit(BI.Pane, { } BI.ListPane.superclass.populate.apply(this, arguments); var tipText = BI.get(arguments, [2], ''); - BI.isNotEmptyString(tipText) && BI.ListPane.superclass.setTipText.apply(this, [tipText]); + BI.isNotEmptyString(tipText) && this.setTipText(tipText); this.button_group.populate.apply(this.button_group, arguments); }, From 17d3312a9ba7faa9da0dabbc6e637076bb5edc68 Mon Sep 17 00:00:00 2001 From: "Jimmy.Chai" Date: Fri, 16 Jul 2021 16:20:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?BI-88584=20reafctor=EF=BC=9A=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=A7=84=E8=8C=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/layer/pane.list.js | 3 ++- src/widget/multiselect/search/multiselect.search.loader.js | 5 ++++- src/widget/singleselect/search/singleselect.search.loader.js | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/case/layer/pane.list.js b/src/case/layer/pane.list.js index d65fb82f0..9cad462cf 100644 --- a/src/case/layer/pane.list.js +++ b/src/case/layer/pane.list.js @@ -122,7 +122,8 @@ BI.ListPane = BI.inherit(BI.Pane, { return; } BI.ListPane.superclass.populate.apply(this, arguments); - var tipText = BI.get(arguments, [2], ''); + var context = BI.get(arguments, [2], {}); + var tipText = context.tipText || ''; BI.isNotEmptyString(tipText) && this.setTipText(tipText); this.button_group.populate.apply(this.button_group, arguments); }, diff --git a/src/widget/multiselect/search/multiselect.search.loader.js b/src/widget/multiselect/search/multiselect.search.loader.js index c57d1e494..dc2cf5d06 100644 --- a/src/widget/multiselect/search/multiselect.search.loader.js +++ b/src/widget/multiselect/search/multiselect.search.loader.js @@ -68,7 +68,10 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, { var json = self._filterValues(self.storeValue); firstItems = self._createItems(json); } - callback(firstItems.concat(self._createItems(ob.items)), keyword, ob.tipText); + var context = { + tipText: ob.tipText, + }; + callback(firstItems.concat(self._createItems(ob.items)), keyword, context); if (op.times === 1 && self.storeValue) { self.setValue(self.storeValue); } diff --git a/src/widget/singleselect/search/singleselect.search.loader.js b/src/widget/singleselect/search/singleselect.search.loader.js index 1ad33f9c1..68a953124 100644 --- a/src/widget/singleselect/search/singleselect.search.loader.js +++ b/src/widget/singleselect/search/singleselect.search.loader.js @@ -64,7 +64,10 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, { var json = self._filterValues(self.storeValue); firstItems = self._createItems(json); } - callback(firstItems.concat(self._createItems(ob.items)), keyword || "", ob.tipText); + var context = { + tipText: ob.tipText, + }; + callback(firstItems.concat(self._createItems(ob.items)), keyword || "", context); if (op.times === 1 && self.storeValue) { self.setValue(self.storeValue); }