Browse Source

BI-78670 feat: 日期区间加个事件,拓展下下拉数字允许传字符串

master
Zhenfei.Li 4 years ago
parent
commit
6f739bda78
  1. 10
      src/widget/multiselect/trigger/button.checkselected.js
  2. 7
      src/widget/timeinterval/dateinterval.js

10
src/widget/multiselect/trigger/button.checkselected.js

@ -51,6 +51,14 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
}, function (res) {
if (BI.isNotEmptyString(res.count)) {
BI.nextTick(function () {
self.numberCounter.setText(res.count);
self.setVisible(true);
});
return;
}
var length = res.count - ob.value.length;
BI.nextTick(function () {
self.numberCounter.setText(length);
@ -88,4 +96,4 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
});
BI.MultiSelectCheckSelectedButton.EVENT_CHANGE = "EVENT_CHANGE";
BI.shortcut("bi.multi_select_check_selected_button", BI.MultiSelectCheckSelectedButton);
BI.shortcut("bi.multi_select_check_selected_button", BI.MultiSelectCheckSelectedButton);

7
src/widget/timeinterval/dateinterval.js

@ -71,6 +71,12 @@ BI.DateInterval = BI.inherit(BI.Single, {
behaviors: o.behaviors,
value: v,
height: o.height,
listeners: [{
eventName: BI.DynamicDateCombo.EVENT_BEFORE_POPUPVIEW,
action: function () {
self.fireEvent(BI.DateInterval.EVENT_BEFORE_POPUPVIEW);
}
}]
});
combo.on(BI.DynamicDateCombo.EVENT_ERROR, function () {
self._clearTitle();
@ -180,4 +186,5 @@ BI.DateInterval = BI.inherit(BI.Single, {
BI.DateInterval.EVENT_VALID = "EVENT_VALID";
BI.DateInterval.EVENT_ERROR = "EVENT_ERROR";
BI.DateInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.DateInterval.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW";
BI.shortcut("bi.date_interval", BI.DateInterval);
Loading…
Cancel
Save