Browse Source

Pull request #2025: BI-88584 feat:自定义提示

Merge in VISUAL/fineui from ~JIMMY.CHAI/fineui:master to master

* commit '17d3312a9ba7faa9da0dabbc6e637076bb5edc68':
  BI-88584 reafctor:代码规范
  BI-88584 reafctor:代码优化
  BI-88584 feat:自定义提示
es6
Jimmy.Chai 3 years ago
parent
commit
fbe4d75e75
  1. 5
      src/base/1.pane.js
  2. 3
      src/case/layer/pane.list.js
  3. 5
      src/widget/multiselect/search/multiselect.search.loader.js
  4. 5
      src/widget/singleselect/search/singleselect.search.loader.js

5
src/base/1.pane.js

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

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

@ -122,6 +122,9 @@ BI.ListPane = BI.inherit(BI.Pane, {
return;
}
BI.ListPane.superclass.populate.apply(this, arguments);
var context = BI.get(arguments, [2], {});
var tipText = context.tipText || '';
BI.isNotEmptyString(tipText) && this.setTipText(tipText);
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);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword);
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword, context);
if (op.times === 1 && 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);
firstItems = self._createItems(json);
}
callback(firstItems.concat(self._createItems(ob.items)), keyword || "");
var context = {
tipText: ob.tipText,
};
callback(firstItems.concat(self._createItems(ob.items)), keyword || "", context);
if (op.times === 1 && self.storeValue) {
self.setValue(self.storeValue);
}

Loading…
Cancel
Save