From fb176966e8eccb59ae10fef81bbb0a1392b49834 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 25 Jun 2021 13:57:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BI-89195=20fix:=20=E5=86=85=E9=83=A8?= =?UTF-8?q?=E5=88=86=E9=9A=94=E7=AC=A6=E4=B8=8D=E4=BD=BF=E7=94=A8=5F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/downlist/item.downlistgroup.js | 4 ++-- src/widget/downlist/popup.downlist.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widget/downlist/item.downlistgroup.js b/src/widget/downlist/item.downlistgroup.js index 2b83786c7e..d89132f47f 100644 --- a/src/widget/downlist/item.downlistgroup.js +++ b/src/widget/downlist/item.downlistgroup.js @@ -73,7 +73,7 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, { _getLevel: function () { var child = BI.first(this.options.childValues); - return BI.isNotNull(child) ? (child + "").split("_").length : 0; + return BI.isNotNull(child) ? (child + "").split(BI.BlankSplitChar).length : 0; }, _digest: function (v) { @@ -81,7 +81,7 @@ BI.DownListGroupItem = BI.inherit(BI.BasicButton, { v = BI.isArray(v) ? v : [v]; var level = this._getLevel(); return BI.any(v, function (idx, value) { - return BI.contains(o.childValues, (value + "").split("_").slice(0, level).join("_")); + return BI.contains(o.childValues, (value + "").split(BI.BlankSplitChar).slice(0, level).join(BI.BlankSplitChar)); }); }, diff --git a/src/widget/downlist/popup.downlist.js b/src/widget/downlist/popup.downlist.js index 9b2a5ce51f..fbf2c2492a 100644 --- a/src/widget/downlist/popup.downlist.js +++ b/src/widget/downlist/popup.downlist.js @@ -183,7 +183,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, { }, _createChildValue: function (fatherValue, childValue) { - return fatherValue + "_" + childValue; + return fatherValue + BI.BlankSplitChar + childValue; }, _digest: function (valueItem) { From 8fbe4988153134c42a5d60b9e2a1a45cef288e04 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 25 Jun 2021 17:08:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?BI-89239=20fix:=20=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../search/singleselect.search.pane.insert.js | 22 +++---------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/widget/singleselect/search/singleselect.search.pane.insert.js b/src/widget/singleselect/search/singleselect.search.pane.insert.js index b9f2a842c8..509a251b40 100644 --- a/src/widget/singleselect/search/singleselect.search.pane.insert.js +++ b/src/widget/singleselect/search/singleselect.search.pane.insert.js @@ -27,17 +27,8 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, { BI.SingleSelectSearchInsertPane.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.tooltipClick = BI.createWidget({ - type: "bi.label", - invisible: true, - text: BI.i18nText("BI-Click_Blank_To_Select"), - cls: "single-select-toolbar", - height: this.constants.height - }); - this.addNotMatchTip = BI.createWidget({ type: "bi.label", - invisible: true, text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""), height: this.constants.height, cls: "bi-high-light", @@ -66,7 +57,7 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, { element: this, items: [{ type: "bi.vertical", - items: [this.tooltipClick, this.addNotMatchTip], + items: [this.addNotMatchTip], height: this.constants.height }, { el: this.loader @@ -75,18 +66,11 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, { }, setKeyword: function (keyword) { - var o = this.options; - var hasSameValue = BI.some(this.loader.getAllButtons(), function (idx, btn) { - return keyword === (o.valueFormatter(btn.getValue()) || btn.getValue()); - }); - var isMatchTipVisible = this.loader.getAllButtons().length > 0 && hasSameValue; - this.tooltipClick.setVisible(isMatchTipVisible); - this.addNotMatchTip.setVisible(!isMatchTipVisible); - !isMatchTipVisible && this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword)); + this.addNotMatchTip.setText(BI.i18nText("BI-Basic_Click_To_Add_Text", keyword)); }, hasMatched: function () { - return this.tooltipClick.isVisible(); + return false; }, setValue: function (v) {