Browse Source

Merge pull request #1296 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit '80b2968c7ac925420bba614052a29c2f853946c7':
  无JIRA任务 可添加值的复选下拉框抛新增值的事件
es6
windy 5 years ago
parent
commit
ce46bde1e7
  1. 1
      changelog.md
  2. 3
      src/widget/multiselect/multiselect.insert.combo.js
  3. 3
      src/widget/multiselect/multiselect.insert.combo.nobar.js

1
changelog.md

@ -1,5 +1,6 @@
# 更新日志 # 更新日志
2.0(2020-04) 2.0(2020-04)
- 复选下拉框新增值的时候外抛事件
- 空格不再编码成&nbsp - 空格不再编码成&nbsp
- 支持文本区域水印可滚动 - 支持文本区域水印可滚动

3
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 () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM, function () {
if (!this.getSearcher().hasMatched()) { if (!this.getSearcher().hasMatched()) {
self._addItem(assertShowValue); self._addItem(assertShowValue);
var addedValue = this.getSearcher().getKeyword();
self._stopEditing(); self._stopEditing();
self.fireEvent(BI.MultiSelectInsertCombo.EVENT_ADD_ITEM, addedValue);
} }
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, function (keywords) { 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_SEARCHING = "EVENT_SEARCHING";
BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM";
BI.MultiSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.MultiSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.MultiSelectInsertCombo.EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
BI.shortcut("bi.multi_select_insert_combo", BI.MultiSelectInsertCombo); BI.shortcut("bi.multi_select_insert_combo", BI.MultiSelectInsertCombo);

3
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 () { this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM, function () {
if (!this.getSearcher().hasMatched()) { if (!this.getSearcher().hasMatched()) {
self._addItem(assertShowValue); self._addItem(assertShowValue);
var addedValue = this.getSearcher().getKeyword();
self._stopEditing(); self._stopEditing();
self.fireEvent(BI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM, addedValue);
} }
}); });
this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_SEARCHING, function (keywords) { 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_CONFIRM = "EVENT_CONFIRM";
BI.MultiSelectInsertNoBarCombo.EVENT_ADD_ITEM = "EVENT_ADD_ITEM";
BI.shortcut("bi.multi_select_insert_no_bar_combo", BI.MultiSelectInsertNoBarCombo); BI.shortcut("bi.multi_select_insert_no_bar_combo", BI.MultiSelectInsertNoBarCombo);
Loading…
Cancel
Save