Browse Source

Pull request #2032: BI-90563 fix:传入tipText的不显示toolbar

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

* commit '5fb15f8f0df2fab474810847b09f774acc09674a':
  BI-90563 fix:传入tipText的不显示toolbar
es6
Jimmy.Chai 3 years ago
parent
commit
fe03f3efd6
  1. 11
      src/case/layer/pane.list.js
  2. 8
      src/case/list/list.select.js

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

@ -121,11 +121,16 @@ 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);
if (BI.isNotEmptyString(tipText)) {
BI.ListPane.superclass.populate.apply(this, []);
this.setTipText(tipText);
} else {
BI.ListPane.superclass.populate.apply(this, arguments);
this.button_group.populate.apply(this.button_group, arguments);
}
},
empty: function () {

8
src/case/list/list.select.js

@ -48,11 +48,13 @@ BI.SelectList = BI.inherit(BI.Widget, {
items: o.items,
itemsCreator: function (op, callback) {
op.times === 1 && self.toolbar.setVisible(false);
o.itemsCreator(op, function (items) {
o.itemsCreator(op, function (items, keywords, context) {
callback.apply(self, arguments);
if (op.times === 1) {
self.toolbar.setVisible(items && items.length > 0);
self.toolbar.setEnable(self.isEnabled() && items && items.length > 0);
var tipText = BI.get(context, 'tipText', '');
var visible = BI.isEmptyString(tipText) && items && items.length > 0;
self.toolbar.setVisible(visible);
self.toolbar.setEnable(self.isEnabled() && visible);
}
self._checkAllSelected();
});

Loading…
Cancel
Save