diff --git a/src/widget/multiselect/search/multiselect.search.loader.js b/src/widget/multiselect/search/multiselect.search.loader.js index 7ccda9374..a4a3d8ed5 100644 --- a/src/widget/multiselect/search/multiselect.search.loader.js +++ b/src/widget/multiselect/search/multiselect.search.loader.js @@ -123,7 +123,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, { }; callback(firstItems.concat(self._createItems(ob.items)), keyword, context); if (op.times === 1 && self.storeValue) { - self.setValue(self.storeValue.value); + self.setValue(self.storeValue); } }); }, @@ -191,9 +191,11 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, { }, setValue: function (v) { + v || (v = {}); + var o = this.options; // 暂存的值一定是新的值,不然v改掉后,storeValue也跟着改了 this.storeValue = BI.deepClone(v); - this.button_group.setValue(v); + o.allowSelectAll ? (this.button_group.setValue(v)) : (this.button_group.setValue(v.value)); }, getValue: function () {