From 6f739bda784b841a9399c8c25f426166074603fc Mon Sep 17 00:00:00 2001 From: "Zhenfei.Li" Date: Mon, 21 Dec 2020 17:09:07 +0800 Subject: [PATCH] =?UTF-8?q?BI-78670=20feat:=20=E6=97=A5=E6=9C=9F=E5=8C=BA?= =?UTF-8?q?=E9=97=B4=E5=8A=A0=E4=B8=AA=E4=BA=8B=E4=BB=B6=EF=BC=8C=E6=8B=93?= =?UTF-8?q?=E5=B1=95=E4=B8=8B=E4=B8=8B=E6=8B=89=E6=95=B0=E5=AD=97=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E4=BC=A0=E5=AD=97=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/multiselect/trigger/button.checkselected.js | 10 +++++++++- src/widget/timeinterval/dateinterval.js | 7 +++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/widget/multiselect/trigger/button.checkselected.js b/src/widget/multiselect/trigger/button.checkselected.js index 15d302a32..47a5ca995 100644 --- a/src/widget/multiselect/trigger/button.checkselected.js +++ b/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); \ No newline at end of file +BI.shortcut("bi.multi_select_check_selected_button", BI.MultiSelectCheckSelectedButton); diff --git a/src/widget/timeinterval/dateinterval.js b/src/widget/timeinterval/dateinterval.js index 894898e32..09fdd95f8 100644 --- a/src/widget/timeinterval/dateinterval.js +++ b/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); \ No newline at end of file