From 1882b1f52bf121d6f72983f031a325b3a1f19fba Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 17 Jun 2020 10:23:06 +0800 Subject: [PATCH] =?UTF-8?q?BI-66722=20fix:=20=E5=8F=AF=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=80=BC=E7=9A=84=E5=8D=95=E9=80=89=E4=B8=8B=E6=8B=89=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=96=B0=E5=A2=9E=E5=80=BC=E6=B2=A1=E6=9C=89=E5=8F=91?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 1 + src/widget/singleselect/singleselectlist.insert.js | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index b761e02fd5..94265b24d5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 更新日志 2.0(2020-06) +- 修复了单选下拉框新增值的时候没有发事件的问题 - 修复了单选标红combo类setValue为空字符串会标红的问题 - BI.history提供与注册路由对应的卸载路由方法unRoute - 修复了单选标红combo类setValue为空和空数组行为不一致的问题 diff --git a/src/widget/singleselect/singleselectlist.insert.js b/src/widget/singleselect/singleselectlist.insert.js index b588aec7b6..a60d81b792 100644 --- a/src/widget/singleselect/singleselectlist.insert.js +++ b/src/widget/singleselect/singleselectlist.insert.js @@ -64,9 +64,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, { self._showAdapter(); self.adapter.setValue(self.storeValue); self.adapter.populate(); - if (self.storeValue.type === BI.Selection.Multi) { - self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); - } + self.fireEvent(BI.SingleSelectInsertList.EVENT_CHANGE); } } }] @@ -211,7 +209,7 @@ BI.SingleSelectInsertList = BI.inherit(BI.Single, { var selectedMap = self._makeMap(items); BI.each(keywords, function (i, val) { if (BI.isNotNull(selectedMap[val])) { - self.storeValue.type === BI.Selection.Single ? BI.pushDistinct(self.storeValue.value, val) : BI.remove(self.storeValue.value, val); + BI.pushDistinct(self.storeValue.value, val) } }); callback();