Browse Source

JSY-26289 fix: 统一setValue和getValue方法

research/test
Renzo 2 years ago
parent
commit
f102934f1d
  1. 6
      src/widget/multiselect/search/multiselect.search.loader.js

6
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 () {

Loading…
Cancel
Save