Browse Source

Pull request #2312: BI-96264 复选下拉框一次粘贴添加值个数最大为2000

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit 'e2cd48d0caeac3ad050d53db6e580ece128987d3':
  BI-96264 复选下拉框一次粘贴添加值个数最大为2000
es6
windy 3 years ago
parent
commit
a91292bdec
  1. 4
      changelog.md
  2. 3
      i18n/i18n.cn.js
  3. 3
      src/widget/multiselect/multiselect.insert.combo.js
  4. 3
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  5. 3
      src/widget/multiselectlist/multiselectlist.insert.js
  6. 3
      src/widget/multiselectlist/multiselectlist.insert.nobar.js

4
changelog.md

@ -1,6 +1,10 @@
# 更新日志 # 更新日志
2.0(2021-11)
- 限制了复选下拉框一次粘贴添加值个数最大2000
2.0(2021-10) 2.0(2021-10)
- combo增加window.blur事件触发隐藏 - combo增加window.blur事件触发隐藏
2.0(2021-09) 2.0(2021-09)
- 支持自动watch - 支持自动watch
- 支持h函数传递left、right,优化left_right_vertical_adapt布局的jsx写法 - 支持h函数传递left、right,优化left_right_vertical_adapt布局的jsx写法

3
i18n/i18n.cn.js

@ -197,5 +197,6 @@ BI.i18n = {
"BI-Basic_Year_Month_Range_Error": "请选择{R1}年{R2}月-{R3}年{R4}月的日期", "BI-Basic_Year_Month_Range_Error": "请选择{R1}年{R2}月-{R3}年{R4}月的日期",
"BI-Basic_Year_Quarter_Range_Error": "请选择{R1}年{R2}季度-{R3}年{R4}季度的日期", "BI-Basic_Year_Quarter_Range_Error": "请选择{R1}年{R2}季度-{R3}年{R4}季度的日期",
"BI-Basic_Search_And_Patch_Paste": "搜索,支持批量粘贴、粘贴值通过换行识别", "BI-Basic_Search_And_Patch_Paste": "搜索,支持批量粘贴、粘贴值通过换行识别",
"BI-Basic_Recommend_Color": "推荐色" "BI-Basic_Recommend_Color": "推荐色",
"BI-Basic_Too_Much_Value_Get_Two_Thousand": "粘贴的值过多,只能识别出前2000个值"
}; };

3
src/widget/multiselect/multiselect.insert.combo.js

@ -81,7 +81,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
var last = BI.last(keywords); var last = BI.last(keywords);
keywords = BI.initial(keywords || []); keywords = BI.initial(keywords || []);
if (keywords.length > 0) { if (keywords.length > 0) {
self._joinKeywords(keywords, function () { self._joinKeywords(keywords.slice(0, 2000), function () {
if (BI.endWith(last, BI.BlankSplitChar)) { if (BI.endWith(last, BI.BlankSplitChar)) {
self.combo.setValue(self.storeValue); self.combo.setValue(self.storeValue);
assertShowValue(); assertShowValue();
@ -93,6 +93,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
} }
self._dataChange = true; self._dataChange = true;
}); });
keywords.length > 2000 && BI.Msg.alert(BI.i18nText("BI-Basic_Prompt"), BI.i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand"));
} }
self.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING); self.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING);
}); });

3
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -76,7 +76,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
var last = BI.last(keywords); var last = BI.last(keywords);
keywords = BI.initial(keywords || []); keywords = BI.initial(keywords || []);
if (keywords.length > 0) { if (keywords.length > 0) {
self._joinKeywords(keywords, function () { self._joinKeywords(keywords.slice(0, 2000), function () {
if (BI.endWith(last, BI.BlankSplitChar)) { if (BI.endWith(last, BI.BlankSplitChar)) {
self.combo.setValue(self.storeValue); self.combo.setValue(self.storeValue);
assertShowValue(); assertShowValue();
@ -88,6 +88,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
} }
self._dataChange = true; self._dataChange = true;
}); });
keywords.length > 2000 && BI.Msg.alert(BI.i18nText("BI-Basic_Prompt"), BI.i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand"));
} }
}); });

3
src/widget/multiselectlist/multiselectlist.insert.js

@ -126,7 +126,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
var last = BI.last(keywords); var last = BI.last(keywords);
keywords = BI.initial(keywords || []); keywords = BI.initial(keywords || []);
if (keywords.length > 0) { if (keywords.length > 0) {
self._joinKeywords(keywords, function () { self._joinKeywords(keywords.slice(0, 2000), function () {
if (BI.endWith(last, BI.BlankSplitChar)) { if (BI.endWith(last, BI.BlankSplitChar)) {
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
assertShowValue(); assertShowValue();
@ -138,6 +138,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE); self.fireEvent(BI.MultiSelectInsertList.EVENT_CHANGE);
}); });
keywords.length > 2000 && BI.Msg.alert(BI.i18nText("BI-Basic_Prompt"), BI.i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand"));
} }
} }
}, { }, {

3
src/widget/multiselectlist/multiselectlist.insert.nobar.js

@ -129,7 +129,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
var last = BI.last(keywords); var last = BI.last(keywords);
keywords = BI.initial(keywords || []); keywords = BI.initial(keywords || []);
if (keywords.length > 0) { if (keywords.length > 0) {
self._joinKeywords(keywords, function () { self._joinKeywords(keywords.slice(0, 2000), function () {
if (BI.endWith(last, BI.BlankSplitChar)) { if (BI.endWith(last, BI.BlankSplitChar)) {
self.adapter.setValue(self.storeValue); self.adapter.setValue(self.storeValue);
assertShowValue(); assertShowValue();
@ -141,6 +141,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE); self.fireEvent(BI.MultiSelectInsertNoBarList.EVENT_CHANGE);
}); });
keywords.length > 2000 && BI.Msg.alert(BI.i18nText("BI-Basic_Prompt"), BI.i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand"));
} }
} }
}, { }, {

Loading…
Cancel
Save