From 837c1b876a5e3ba4dcb826868cf1538f4d6d3ff4 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 21 Jun 2021 16:05:52 +0800 Subject: [PATCH] =?UTF-8?q?BI-88931=20fix:=20=E4=BD=BF=E7=94=A8=E5=A4=9A?= =?UTF-8?q?=E4=B8=AA=E7=A9=BA=E5=AD=97=E7=AC=A6=E4=B8=B2=E4=BD=9C=E4=B8=BA?= =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=A4=8D=E5=88=B6=E5=80=BC=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/multiselect/multiselect.combo.js | 2 +- src/widget/multiselect/multiselect.combo.nobar.js | 2 +- src/widget/multiselect/multiselect.insert.combo.js | 2 +- src/widget/multiselectlist/multiselectlist.insert.js | 2 +- src/widget/multiselectlist/multiselectlist.insert.nobar.js | 2 +- src/widget/multiselectlist/multiselectlist.js | 2 +- src/widget/singleselect/trigger/searcher.singleselect.js | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index 7b948e764..b57185335 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -395,7 +395,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { var map = this._makeMap(this.storeValue.value); BI.each(res.value, function (i, v) { if (!map[v]) { - self.storeValue.value.push(v); + BI.pushDistinct(self.storeValue.value, v); BI.remove(self.storeValue.assist, v); map[v] = v; } diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index 1589b65e6..6203175e4 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -422,7 +422,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { var map = this._makeMap(this.storeValue.value); BI.each(res.value, function (i, v) { if (!map[v]) { - self.storeValue.value.push(v); + BI.pushDistinct(self.storeValue.value, v); BI.remove(self.storeValue.assist, v); map[v] = v; } diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index 22fcf2ca0..5f025448b 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -407,7 +407,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { var map = this._makeMap(this.storeValue.value); BI.each(res.value, function (i, v) { if (!map[v]) { - self.storeValue.value.push(v); + BI.pushDistinct(self.storeValue.value, v); // value更新的时候assist也需要更新 BI.remove(self.storeValue.assist, v); map[v] = v; diff --git a/src/widget/multiselectlist/multiselectlist.insert.js b/src/widget/multiselectlist/multiselectlist.insert.js index 568ea43cb..f4cea55c3 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.js +++ b/src/widget/multiselectlist/multiselectlist.insert.js @@ -281,7 +281,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { var map = this._makeMap(this.storeValue.value); BI.each(res.value, function (i, v) { if (!map[v]) { - self.storeValue.value.push(v); + BI.pushDistinct(self.storeValue.value, v); map[v] = v; } }); diff --git a/src/widget/multiselectlist/multiselectlist.insert.nobar.js b/src/widget/multiselectlist/multiselectlist.insert.nobar.js index 34576be60..bbb6c23bb 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.nobar.js +++ b/src/widget/multiselectlist/multiselectlist.insert.nobar.js @@ -285,7 +285,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, { var map = this._makeMap(this.storeValue.value); BI.each(res.value, function (i, v) { if (!map[v]) { - self.storeValue.value.push(v); + BI.pushDistinct(self.storeValue.value, v); map[v] = v; } }); diff --git a/src/widget/multiselectlist/multiselectlist.js b/src/widget/multiselectlist/multiselectlist.js index e5bc5b772..e4a046793 100644 --- a/src/widget/multiselectlist/multiselectlist.js +++ b/src/widget/multiselectlist/multiselectlist.js @@ -301,7 +301,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { var map = this._makeMap(this.storeValue.value); BI.each(res.value, function (i, v) { if (!map[v]) { - self.storeValue.value.push(v); + BI.pushDistinct(self.storeValue.value, v); map[v] = v; } }); diff --git a/src/widget/singleselect/trigger/searcher.singleselect.js b/src/widget/singleselect/trigger/searcher.singleselect.js index f49188e41..aa5ece93b 100644 --- a/src/widget/singleselect/trigger/searcher.singleselect.js +++ b/src/widget/singleselect/trigger/searcher.singleselect.js @@ -108,7 +108,7 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, { }, getKeyword: function () { - return this.editor.getValue(); + return this.editor.getKeyword(); }, hasMatched: function () {