Browse Source

BI-88584 feat:自定义提示

es6
Jimmy.Chai 3 years ago
parent
commit
6ec3573b6e
  1. 4
      src/base/1.pane.js
  2. 2
      src/case/layer/pane.list.js
  3. 2
      src/widget/multiselect/search/multiselect.search.loader.js
  4. 2
      src/widget/singleselect/search/singleselect.search.loader.js

4
src/base/1.pane.js

@ -138,6 +138,10 @@ BI.Pane = BI.inherit(BI.Widget, {
}
},
setTipText: function (text) {
this._tipText.setText(text);
},
populate: function (items) {
this.options.items = items || [];
this.check();

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

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

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

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

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

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

Loading…
Cancel
Save