From 6ec3573b6e1194285af80201290457f82768623f Mon Sep 17 00:00:00 2001 From: "Jimmy.Chai" Date: Thu, 15 Jul 2021 23:42:17 +0800 Subject: [PATCH] =?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); }