From 8a7d4452aa1c728ee56a9ef2853bbee5998ee667 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 22 Oct 2019 10:03:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BI-53932=20fix:=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E5=8D=95=E9=80=89=E4=B8=8B=E6=8B=89=E5=92=8C=E5=A4=8D=E9=80=89?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E7=9A=84=E6=96=B0=E5=A2=9E=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=80=BC=E7=9A=84=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 1 + .../singleselect/singleselect.insert.combo.js | 16 +++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/changelog.md b/changelog.md index 566e578cb..4714cc63c 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ - 修复了下拉树搜索高亮字符与正常字符间存在间距的问题 - 复选下拉系列的计数器从trigger中拆分, 作为独立的部分 - 增加BI.createElement方法 +- 统一了单选下拉和复选下拉添加自定义值的交互效果 2.0(2019-09) - [视觉]popover弹出框增加圆角 diff --git a/src/widget/singleselect/singleselect.insert.combo.js b/src/widget/singleselect/singleselect.insert.combo.js index 499f6e117..c6a808d6c 100644 --- a/src/widget/singleselect/singleselect.insert.combo.js +++ b/src/widget/singleselect/singleselect.insert.combo.js @@ -82,13 +82,15 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, { self.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP); }); this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE, function () { - var keyword = this.getSearcher().getKeyword(); - self.storeValue = keyword; - self.combo.setValue(self.storeValue); - self._setStartValue(keyword); - assertShowValue(); - self.populate(); - self._setStartValue(); + if (this.getSearcher().hasMatched()) { + var keyword = this.getSearcher().getKeyword(); + self.storeValue = keyword; + self.combo.setValue(self.storeValue); + self._setStartValue(keyword); + assertShowValue(); + self.populate(); + self._setStartValue(); + } }); this.trigger.on(BI.SingleSelectTrigger.EVENT_SEARCHING, function (keywords) { var last = BI.last(keywords); From f89d6c1e8bc5f48e058e5246b5a19e897851be2e Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 22 Oct 2019 14:11:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?BI-53865=20refactor:=20=E5=8F=AF=E9=85=8D?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E6=9C=80=E5=B0=8F=E5=AE=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/combo/bubblecombo/popup.bubble.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/case/combo/bubblecombo/popup.bubble.js b/src/case/combo/bubblecombo/popup.bubble.js index 177aab304..0bfea2611 100644 --- a/src/case/combo/bubblecombo/popup.bubble.js +++ b/src/case/combo/bubblecombo/popup.bubble.js @@ -137,6 +137,9 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, { }); return { type: "bi.bubble_bar_popup_view", + minWidth: o.minWidth, + maxWidth: o.maxWidth, + minHeight: o.minHeight, ref: function () { self.popup = this; },