From 7c78246f38368e52010c23578c8537d0f5c19f66 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 23 Mar 2020 18:21:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?BI-62084=20fix:=20IE9=E4=B8=8B=E4=BD=BF?= =?UTF-8?q?=E7=94=A8bi.file=E4=B8=8A=E4=BC=A0=E5=8C=85=E5=90=AB=E7=89=B9?= =?UTF-8?q?=E6=AE=8A=E5=AD=97=E7=AC=A6=E7=9A=84excel=E5=87=BA=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 1 + src/base/single/input/file.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 3fde730da..5412b15c3 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 更新日志 2.0(2020-03) +- 修复了IE9下使用bi.file上传包含特殊字符的excel出错的问题 - 修复了下拉类型控件不允许编辑的时候没有title的问题 - 修复了连续多次调用BI.Msg.alert后只有最后弹出的可以关闭的问题 - 修复了time_combo设置格式为%M:%S后value设置大于30分钟的值时标红的问题 diff --git a/src/base/single/input/file.js b/src/base/single/input/file.js index 51fc59158..e5ccf83f8 100644 --- a/src/base/single/input/file.js +++ b/src/base/single/input/file.js @@ -263,7 +263,11 @@ } // attachO.fileSize = responseText.length; - attachO.filename = _global.decodeURIComponent(handler.file.fileName); + try { + attachO.filename = _global.decodeURIComponent(handler.file.fileName); + } catch (e) { + attachO.filename = handler.file.fileName; + } if (handler.maxlength == 1) { handler.attach_array[0] = attachO; } else { From af698e59fcb19975dfc31463efcb623747a8b608 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 23 Mar 2020 18:23:40 +0800 Subject: [PATCH 2/2] update --- src/base/single/input/file.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/base/single/input/file.js b/src/base/single/input/file.js index e5ccf83f8..a7c99f985 100644 --- a/src/base/single/input/file.js +++ b/src/base/single/input/file.js @@ -264,6 +264,7 @@ // attachO.fileSize = responseText.length; try { + // decodeURIComponent特殊字符可能有问题, catch一下,保证能正常上传 attachO.filename = _global.decodeURIComponent(handler.file.fileName); } catch (e) { attachO.filename = handler.file.fileName;