|
@@ -2235,10 +2235,11 @@ export default {
|
|
const isRar = file.type === 'application/x-rar-compressed';
|
|
const isRar = file.type === 'application/x-rar-compressed';
|
|
const isZip = file.type === 'application/x-zip-compressed';
|
|
const isZip = file.type === 'application/x-zip-compressed';
|
|
const isTxt = file.type === 'text/plain';
|
|
const isTxt = file.type === 'text/plain';
|
|
|
|
+ const isPdf = file.type === 'application/pdf';
|
|
//文件大小不能超过2M
|
|
//文件大小不能超过2M
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
const isLt2M = file.size / 1024 / 1024 < 2;
|
|
|
|
|
|
- if (!isTxt && !isDoc && !isDocx && !isXls && !isXlsx && !isPptx && !isRar && !isZip) {
|
|
|
|
|
|
+ if (!isTxt && !isDoc && !isDocx && !isXls && !isXlsx && !isPptx && !isRar && !isZip && !isPdf) {
|
|
this.$message.error('该文件类型不允许上传!');
|
|
this.$message.error('该文件类型不允许上传!');
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|