上传文件时,不区分文件类型大小写。
Signed-off-by: 云飞扬 <15678871232@qq.com>
This commit is contained in:
parent
ee3f03f1f1
commit
a3d0bc469b
|
|
@ -116,7 +116,7 @@ export default {
|
|||
if (this.fileType) {
|
||||
const fileName = file.name.split('.');
|
||||
const fileExt = fileName[fileName.length - 1];
|
||||
const isTypeOk = this.fileType.indexOf(fileExt) >= 0;
|
||||
const isTypeOk = this.fileType.toLowerCase().indexOf(fileExt.toLowerCase()) >= 0;
|
||||
if (!isTypeOk) {
|
||||
this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue