From 0547cb0797fe5ef5ddcb6c4031eb3fc230207780 Mon Sep 17 00:00:00 2001 From: zsmj Date: Fri, 23 Sep 2022 14:38:53 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-12908=20fix:=20=E5=A4=8D=E9=80=89?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E7=9A=84value=E5=BC=95=E7=94=A8=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/multiselect/multiselect.insert.combo.nobar.js | 2 +- src/widget/multiselectlist/multiselectlist.insert.js | 2 +- src/widget/multiselectlist/multiselectlist.insert.nobar.js | 4 ++-- src/widget/multiselectlist/multiselectlist.js | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index 00b035096..836193f96 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -35,7 +35,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { self.trigger.getSearcher().setState(self.storeValue); self.numberCounter.setButtonChecked(self.storeValue); }; - this.storeValue = o.value || {}; + this.storeValue = BI.deepClone(o.value) || {}; this._assertValue(this.storeValue); diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index b06a40662..c2a0851c6 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -34,7 +34,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { }; this.storeValue = { type: BI.Selection.Multi, - value: o.value || [] + value: BI.deepClone(o.value) || [] }; // 标记正在请求数据 this.requesting = false; diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index 329c0f3f9..eee22c4db 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -33,7 +33,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { self.trigger.getSearcher().setState(self.storeValue); self.numberCounter.setButtonChecked(self.storeValue); }; - this.storeValue = o.value || {}; + this.storeValue = BI.deepClone(o.value) || {}; // 标记正在请求数据 this.requesting = false; diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index 1b92a9622..bb4a71ac1 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -34,7 +34,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { }; this.storeValue = { type: BI.Selection.Multi, - value: o.value || [] + value: BI.deepClone(o.value) || [] }; // 标记正在请求数据 this.requesting = false; diff --git a/src/widget/multiselectlist/multiselectlist.insert.js b/src/widget/multiselectlist/multiselectlist.insert.js index 3311d3536..cc905c88f 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.js +++ b/src/widget/multiselectlist/multiselectlist.insert.js @@ -15,7 +15,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { BI.MultiSelectInsertList.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.storeValue = this._assertValue(o.value || {}); + this.storeValue = this._assertValue(BI.deepClone(o.value) || {}); var assertShowValue = function () { BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue)); diff --git a/src/widget/multiselectlist/multiselectlist.insert.nobar.js b/src/widget/multiselectlist/multiselectlist.insert.nobar.js index e2c8f2008..be87999ad 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.nobar.js +++ b/src/widget/multiselectlist/multiselectlist.insert.nobar.js @@ -16,7 +16,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, { var self = this, o = this.options; this.storeValue = { type: BI.Selection.Multi, - value: o.value || [] + value: BI.deepClone(o.value) || [] }; var assertShowValue = function () { @@ -363,4 +363,4 @@ BI.extend(BI.MultiSelectInsertNoBarList, { }); BI.MultiSelectInsertNoBarList.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.multi_select_insert_no_bar_list", BI.MultiSelectInsertNoBarList); \ No newline at end of file +BI.shortcut("bi.multi_select_insert_no_bar_list", BI.MultiSelectInsertNoBarList); diff --git a/src/widget/multiselectlist/multiselectlist.js b/src/widget/multiselectlist/multiselectlist.js index bf152a17a..7255963df 100644 --- a/src/widget/multiselectlist/multiselectlist.js +++ b/src/widget/multiselectlist/multiselectlist.js @@ -15,7 +15,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { BI.MultiSelectList.superclass._init.apply(this, arguments); var self = this, o = this.options; - this.storeValue = this._assertValue(o.value || {}); + this.storeValue = this._assertValue(BI.deepClone(o.value) || {}); var assertShowValue = function () { BI.isKey(self._startValue) && (self.storeValue.type === BI.Selection.All ? BI.remove(self.storeValue.value, self._startValue) : BI.pushDistinct(self.storeValue.value, self._startValue));