【修改】文件上传限制
This commit is contained in:
@@ -467,7 +467,7 @@ export default {
|
|||||||
beforeUploadFile(file) {
|
beforeUploadFile(file) {
|
||||||
let realFileType = file.name.split('.')[file.name.split('.').length - 1];
|
let realFileType = file.name.split('.')[file.name.split('.').length - 1];
|
||||||
const isType = (
|
const isType = (
|
||||||
file.type === fileType.pdf || file.type === fileType.xls || file.type === fileType.xlsx || file.type === fileType.doc || file.type === fileType.docx || file.type === fileType.ppt || file.type === fileType.pptx
|
file.type === fileType.pdf || file.type === fileType.ppt || file.type === fileType.pptx
|
||||||
|| realFileType === 'pdf' || realFileType === 'ppt' || realFileType === 'pptx'
|
|| realFileType === 'pdf' || realFileType === 'ppt' || realFileType === 'pptx'
|
||||||
);
|
);
|
||||||
const isSize = file.size / 1024 / 1024 < 200;
|
const isSize = file.size / 1024 / 1024 < 200;
|
||||||
|
|||||||
Reference in New Issue
Block a user