Browse Source

BI-90563 fix:传入tipText的不显示toolbar

es6
Jimmy.Chai 3 years ago
parent
commit
c7e9f74aa0
  1. 9
      src/case/layer/pane.list.js
  2. 8
      src/case/list/list.select.js

9
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);
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