From e2cd48d0caeac3ad050d53db6e580ece128987d3 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 30 Nov 2021 14:20:03 +0800 Subject: [PATCH] =?UTF-8?q?BI-96264=20=E5=A4=8D=E9=80=89=E4=B8=8B=E6=8B=89?= =?UTF-8?q?=E6=A1=86=E4=B8=80=E6=AC=A1=E7=B2=98=E8=B4=B4=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=80=BC=E4=B8=AA=E6=95=B0=E6=9C=80=E5=A4=A7=E4=B8=BA2000?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 4 ++++ i18n/i18n.cn.js | 3 ++- src/widget/multiselect/multiselect.insert.combo.js | 3 ++- src/widget/multiselect/multiselect.insert.combo.nobar.js | 3 ++- src/widget/multiselectlist/multiselectlist.insert.js | 3 ++- src/widget/multiselectlist/multiselectlist.insert.nobar.js | 3 ++- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index 74d3a0360..bbbb0f3c5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,10 @@ # 更新日志 +2.0(2021-11) +- 限制了复选下拉框一次粘贴添加值个数最大2000 + 2.0(2021-10) - combo增加window.blur事件触发隐藏 + 2.0(2021-09) - 支持自动watch - 支持h函数传递left、right,优化left_right_vertical_adapt布局的jsx写法 diff --git a/i18n/i18n.cn.js b/i18n/i18n.cn.js index 77db2c53d..9a43ca507 100644 --- a/i18n/i18n.cn.js +++ b/i18n/i18n.cn.js @@ -197,5 +197,6 @@ BI.i18n = { "BI-Basic_Year_Month_Range_Error": "请选择{R1}年{R2}月-{R3}年{R4}月的日期", "BI-Basic_Year_Quarter_Range_Error": "请选择{R1}年{R2}季度-{R3}年{R4}季度的日期", "BI-Basic_Search_And_Patch_Paste": "搜索,支持批量粘贴、粘贴值通过换行识别", - "BI-Basic_Recommend_Color": "推荐色" + "BI-Basic_Recommend_Color": "推荐色", + "BI-Basic_Too_Much_Value_Get_Two_Thousand": "粘贴的值过多,只能识别出前2000个值" }; \ No newline at end of file diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index 35d005cd6..c77953401 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -81,7 +81,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { var last = BI.last(keywords); keywords = BI.initial(keywords || []); if (keywords.length > 0) { - self._joinKeywords(keywords, function () { + self._joinKeywords(keywords.slice(0, 2000), function () { if (BI.endWith(last, BI.BlankSplitChar)) { self.combo.setValue(self.storeValue); assertShowValue(); @@ -93,6 +93,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { } 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); }); diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index fe1293a5c..28065441e 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/src/widget/multiselect/multiselect.insert.combo.nobar.js @@ -76,7 +76,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { var last = BI.last(keywords); keywords = BI.initial(keywords || []); if (keywords.length > 0) { - self._joinKeywords(keywords, function () { + self._joinKeywords(keywords.slice(0, 2000), function () { if (BI.endWith(last, BI.BlankSplitChar)) { self.combo.setValue(self.storeValue); assertShowValue(); @@ -88,6 +88,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, { } self._dataChange = true; }); + keywords.length > 2000 && BI.Msg.alert(BI.i18nText("BI-Basic_Prompt"), BI.i18nText("BI-Basic_Too_Much_Value_Get_Two_Thousand")); } }); diff --git a/src/widget/multiselectlist/multiselectlist.insert.js b/src/widget/multiselectlist/multiselectlist.insert.js index 2fe856a8e..b27d1271b 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.js +++ b/src/widget/multiselectlist/multiselectlist.insert.js @@ -126,7 +126,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { var last = BI.last(keywords); keywords = BI.initial(keywords || []); if (keywords.length > 0) { - self._joinKeywords(keywords, function () { + self._joinKeywords(keywords.slice(0, 2000), function () { if (BI.endWith(last, BI.BlankSplitChar)) { self.adapter.setValue(self.storeValue); assertShowValue(); @@ -138,6 +138,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { } 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")); } } }, { diff --git a/src/widget/multiselectlist/multiselectlist.insert.nobar.js b/src/widget/multiselectlist/multiselectlist.insert.nobar.js index e4b74eff3..6e5f1d65b 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.nobar.js +++ b/src/widget/multiselectlist/multiselectlist.insert.nobar.js @@ -129,7 +129,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, { var last = BI.last(keywords); keywords = BI.initial(keywords || []); if (keywords.length > 0) { - self._joinKeywords(keywords, function () { + self._joinKeywords(keywords.slice(0, 2000), function () { if (BI.endWith(last, BI.BlankSplitChar)) { self.adapter.setValue(self.storeValue); assertShowValue(); @@ -141,6 +141,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, { } 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")); } } }, {