|
|
|
|
@ -517,7 +517,7 @@
|
|
|
|
|
</el-button>
|
|
|
|
|
<template #tip>
|
|
|
|
|
<div class="el-upload__tip">
|
|
|
|
|
支持上传多个文件,单个文件不超过10MB
|
|
|
|
|
支持上传多个文件,单个文件不超过50MB
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-upload>
|
|
|
|
|
@ -2410,14 +2410,14 @@ const uploadHeaders = computed(() => {
|
|
|
|
|
// 文件上传前验证
|
|
|
|
|
const beforeUpload = (file) => {
|
|
|
|
|
const isValidType = ['image/jpeg', 'image/png', 'image/jpg', 'application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'].includes(file.type)
|
|
|
|
|
const isLt10M = file.size / 1024 / 1024 < 10
|
|
|
|
|
const isLt50M = file.size / 1024 / 1024 < 50
|
|
|
|
|
|
|
|
|
|
if (!isValidType) {
|
|
|
|
|
ElMessage.error('只能上传 JPG/PNG/PDF/DOC/DOCX/XLS/XLSX 格式的文件!')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
if (!isLt10M) {
|
|
|
|
|
ElMessage.error('文件大小不能超过 10MB!')
|
|
|
|
|
if (!isLt50M) {
|
|
|
|
|
ElMessage.error('文件大小不能超过 50MB!')
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
return true
|
|
|
|
|
|