Browse Source

BI-88584 reafctor:代码规范

es6
Jimmy.Chai 3 years ago
parent
commit
17d3312a9b
  1. 3
      src/case/layer/pane.list.js
  2. 5
      src/widget/multiselect/search/multiselect.search.loader.js
  3. 5
      src/widget/singleselect/search/singleselect.search.loader.js

3
src/case/layer/pane.list.js

@ -122,7 +122,8 @@ BI.ListPane = BI.inherit(BI.Pane, {
return; return;
} }
BI.ListPane.superclass.populate.apply(this, arguments); BI.ListPane.superclass.populate.apply(this, arguments);
var tipText = BI.get(arguments, [2], ''); var context = BI.get(arguments, [2], {});
var tipText = context.tipText || '';
BI.isNotEmptyString(tipText) && this.setTipText(tipText); BI.isNotEmptyString(tipText) && this.setTipText(tipText);
this.button_group.populate.apply(this.button_group, arguments); this.button_group.populate.apply(this.button_group, arguments);
}, },

5
src/widget/multiselect/search/multiselect.search.loader.js

@ -68,7 +68,10 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue); var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json); firstItems = self._createItems(json);
} }
callback(firstItems.concat(self._createItems(ob.items)), keyword, ob.tipText); var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword, context);
if (op.times === 1 && self.storeValue) { if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue); self.setValue(self.storeValue);
} }

5
src/widget/singleselect/search/singleselect.search.loader.js

@ -64,7 +64,10 @@ BI.SingleSelectSearchLoader = BI.inherit(BI.Widget, {
var json = self._filterValues(self.storeValue); var json = self._filterValues(self.storeValue);
firstItems = self._createItems(json); firstItems = self._createItems(json);
} }
callback(firstItems.concat(self._createItems(ob.items)), keyword || "", ob.tipText); var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword || "", context);
if (op.times === 1 && self.storeValue) { if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue); self.setValue(self.storeValue);
} }

Loading…
Cancel
Save