From 8e5bc7b3d0cd22491b7789339c0fbfd8e0b6bcc8 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 17 Jul 2020 11:15:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widget/date/calendar/picker.date.js | 4 +++- src/widget/multiselect/multiselect.combo.js | 3 ++- .../multiselect/search/multiselect.search.insert.pane.js | 2 +- src/widget/multiselect/search/multiselect.search.pane.js | 2 +- .../singleselect/search/singleselect.search.pane.insert.js | 2 +- src/widget/singleselect/search/singleselect.search.pane.js | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/widget/date/calendar/picker.date.js b/src/widget/date/calendar/picker.date.js index 0d5d48d7b..6c702e7cb 100644 --- a/src/widget/date/calendar/picker.date.js +++ b/src/widget/date/calendar/picker.date.js @@ -147,7 +147,7 @@ BI.DatePicker = BI.inherit(BI.Widget, { maxDate.setDate(1); var calcMin = BI.print(minDate, "%Y-%X-%d"); var calcMax = BI.print(maxDate, "%Y-%X-%d"); - + return BI.filter(BI.range(1, 13), function (idx, v) { return !BI.checkDateVoid(self.year.getValue(), v, 1, calcMin, calcMax)[0]; }); @@ -172,10 +172,12 @@ BI.DatePicker = BI.inherit(BI.Widget, { }, setMinDate: function (minDate) { + this.options.min = minDate; this.year.setMinDate(minDate); }, setMaxDate: function (maxDate) { + this.options.max = maxDate; this.year.setMaxDate(maxDate); }, diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index e73d36e1c..09c2c8ce2 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -14,7 +14,8 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { attributes: { tabIndex: 0 }, - allowEdit: true + allowEdit: true, + allowBlankAdd: true }); }, diff --git a/src/widget/multiselect/search/multiselect.search.insert.pane.js b/src/widget/multiselect/search/multiselect.search.insert.pane.js index bab589731..c3228e886 100644 --- a/src/widget/multiselect/search/multiselect.search.insert.pane.js +++ b/src/widget/multiselect/search/multiselect.search.insert.pane.js @@ -78,7 +78,7 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, { setKeyword: function (keyword) { var o = this.options; var hasSameValue = BI.some(this.loader.getAllButtons(), function (idx, btn) { - return keyword === (o.valueFormatter(btn.getValue()) || btn.getValue()); + return keyword === btn.getValue(); }); var isMatchTipVisible = this.loader.getAllButtons().length > 0 && hasSameValue; this.tooltipClick.setVisible(isMatchTipVisible); diff --git a/src/widget/multiselect/search/multiselect.search.pane.js b/src/widget/multiselect/search/multiselect.search.pane.js index 6a8dced7b..d79502f94 100644 --- a/src/widget/multiselect/search/multiselect.search.pane.js +++ b/src/widget/multiselect/search/multiselect.search.pane.js @@ -65,7 +65,7 @@ BI.MultiSelectSearchPane = BI.inherit(BI.Widget, { setKeyword: function (keyword) { var btn, o = this.options; - var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === (o.valueFormatter(btn.getValue()) || btn.getValue())); + var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && keyword === btn.getValue(); if (isVisible !== this.tooltipClick.isVisible()) { this.tooltipClick.setVisible(isVisible); this.resizer.attr("items")[0].height = (isVisible ? this.constants.height : 0); diff --git a/src/widget/singleselect/search/singleselect.search.pane.insert.js b/src/widget/singleselect/search/singleselect.search.pane.insert.js index df6036a42..5945801df 100644 --- a/src/widget/singleselect/search/singleselect.search.pane.insert.js +++ b/src/widget/singleselect/search/singleselect.search.pane.insert.js @@ -80,7 +80,7 @@ BI.SingleSelectSearchInsertPane = BI.inherit(BI.Widget, { setKeyword: function (keyword) { var o = this.options; var hasSameValue = BI.some(this.loader.getAllButtons(), function (idx, btn) { - return keyword === (o.valueFormatter(btn.getValue()) || btn.getValue()); + return keyword === btn.getValue(); }); var isMatchTipVisible = this.loader.getAllButtons().length > 0 && hasSameValue; this.tooltipClick.setVisible(isMatchTipVisible); diff --git a/src/widget/singleselect/search/singleselect.search.pane.js b/src/widget/singleselect/search/singleselect.search.pane.js index e5364e261..dbdf670bc 100644 --- a/src/widget/singleselect/search/singleselect.search.pane.js +++ b/src/widget/singleselect/search/singleselect.search.pane.js @@ -67,7 +67,7 @@ BI.SingleSelectSearchPane = BI.inherit(BI.Widget, { setKeyword: function (keyword) { var btn, o = this.options; - var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && (keyword === (o.valueFormatter(btn.getValue()) || btn.getValue())); + var isVisible = this.loader.getAllButtons().length > 0 && (btn = this.loader.getAllButtons()[0]) && keyword === btn.getValue(); if (isVisible !== this.tooltipClick.isVisible()) { this.tooltipClick.setVisible(isVisible); this.resizer.attr("items")[0].height = (isVisible ? this.constants.height : 0); From 4778b9ebd6c2b83f694fa494be8ef2bd67347c6c Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Fri, 17 Jul 2020 11:17:19 +0800 Subject: [PATCH 2/2] update --- src/widget/multiselect/multiselect.combo.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index 09c2c8ce2..e73d36e1c 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -14,8 +14,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { attributes: { tabIndex: 0 }, - allowEdit: true, - allowBlankAdd: true + allowEdit: true }); },