From 80b2968c7ac925420bba614052a29c2f853946c7 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 13 Apr 2020 10:27:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E5=8F=AF?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=80=BC=E7=9A=84=E5=A4=8D=E9=80=89=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86=E6=8A=9B=E6=96=B0=E5=A2=9E=E5=80=BC=E7=9A=84?= =?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/multiselect/multiselect.insert.combo.js | 3 +++ src/widget/multiselect/multiselect.insert.combo.nobar.js | 3 +++ 3 files changed, 7 insertions(+) diff --git a/changelog.md b/changelog.md index 171704388..fe1e30a8a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 更新日志 2.0(2020-04) +- 复选下拉框新增值的时候外抛事件 - 空格不再编码成  - 支持文本区域水印可滚动 diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index 457c4fadf..7fdc71c35 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -74,7 +74,9 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM, function () { if (!this.getSearcher().hasMatched()) { self._addItem(assertShowValue); + var addedValue = this.getSearcher().getKeyword(); self._stopEditing(); + self.fireEvent(BI.MultiSelectInsertCombo.EVENT_ADD_ITEM, addedValue); } }); this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, function (keywords) { @@ -456,5 +458,6 @@ BI.MultiSelectInsertCombo.EVENT_STOP = "EVENT_STOP"; BI.MultiSelectInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.MultiSelectInsertCombo.EVENT_ADD_ITEM = "EVENT_ADD_ITEM"; BI.shortcut("bi.multi_select_insert_combo", BI.MultiSelectInsertCombo); \ No newline at end of file diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index 0e39286b1..cb7ac6c12 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -69,7 +69,9 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM, function () { if (!this.getSearcher().hasMatched()) { self._addItem(assertShowValue); + var addedValue = this.getSearcher().getKeyword(); self._stopEditing(); + self.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM, addedValue); } }); this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, function (keywords) { @@ -448,5 +450,6 @@ BI.extend(BI.MultiSelectInsertNoBarCombo, { }); BI.MultiSelectInsertNoBarCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; +BI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM = "EVENT_ADD_ITEM"; BI.shortcut("bi.multi_select_insert_no_bar_combo", BI.MultiSelectInsertNoBarCombo); \ No newline at end of file