Browse Source

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

Merge in VISUAL/fineui from ~ZHENFEI.LI/fineui:master to master

* commit '5b7ec8c4242ecffe1834debfc41924de60e70f89':
  BI-78670 refactor: 根据comment优化代码
  BI-78670 feat: 日期区间加个事件,拓展下下拉数字允许传字符串
es6
Zhenfei.Li 4 years ago
parent
commit
a768485c2f
  1. 8
      src/widget/multiselect/trigger/button.checkselected.js
  2. 7
      src/widget/timeinterval/dateinterval.js

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

@ -51,6 +51,14 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, {
o.itemsCreator({ o.itemsCreator({
type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH type: BI.MultiSelectCombo.REQ_GET_DATA_LENGTH
}, function (res) { }, 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; var length = res.count - ob.value.length;
BI.nextTick(function () { BI.nextTick(function () {
self.numberCounter.setText(length); self.numberCounter.setText(length);

7
src/widget/timeinterval/dateinterval.js

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