|
@@ -6,13 +6,13 @@
|
|
|
<el-icon><UploadFilled /></el-icon>
|
|
<el-icon><UploadFilled /></el-icon>
|
|
|
<span>{{ label }}</span>
|
|
<span>{{ label }}</span>
|
|
|
</label>
|
|
</label>
|
|
|
- <span class="upload-button-support">支持pdf、word、excel文件</span>
|
|
|
|
|
|
|
+ <span class="upload-button-support">支持pdf、docx、xlsx、pptx文件</span>
|
|
|
</div>
|
|
</div>
|
|
|
<input
|
|
<input
|
|
|
type="file"
|
|
type="file"
|
|
|
id="fileInput"
|
|
id="fileInput"
|
|
|
multiple
|
|
multiple
|
|
|
- accept=".pdf,.docx,.xls,.xlsx,.ppt,.pptx"
|
|
|
|
|
|
|
+ accept=".pdf,.docx,.xlsx,.pptx"
|
|
|
@change="handleFileSelect"
|
|
@change="handleFileSelect"
|
|
|
:disabled="isUploadDisabled"
|
|
:disabled="isUploadDisabled"
|
|
|
/>
|
|
/>
|
|
@@ -49,7 +49,6 @@
|
|
|
import { ref, computed, nextTick, watch } from 'vue';
|
|
import { ref, computed, nextTick, watch } from 'vue';
|
|
|
import { UploadFilled, Delete } from '@element-plus/icons-vue';
|
|
import { UploadFilled, Delete } from '@element-plus/icons-vue';
|
|
|
import { ElMessage } from 'element-plus';
|
|
import { ElMessage } from 'element-plus';
|
|
|
- import { msgConfirm } from '@/utils/element-plus/messageBox';
|
|
|
|
|
|
|
|
|
|
import { FILE_TYPE_ICON } from '../constant';
|
|
import { FILE_TYPE_ICON } from '../constant';
|
|
|
import type { FileItem } from '../types';
|
|
import type { FileItem } from '../types';
|
|
@@ -126,7 +125,7 @@
|
|
|
|
|
|
|
|
filesToProcess.forEach((file) => {
|
|
filesToProcess.forEach((file) => {
|
|
|
if (!isValidFileType(file)) {
|
|
if (!isValidFileType(file)) {
|
|
|
- ElMessage.error(`文件${file.name}格式不正确,请上传pdf、word、excel、ppt文件`);
|
|
|
|
|
|
|
+ ElMessage.error(`文件${file.name}格式不正确,请上传新版本pdf、word、excel、ppt文件`);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -168,9 +167,7 @@
|
|
|
'application/pdf',
|
|
'application/pdf',
|
|
|
'application/msword',
|
|
'application/msword',
|
|
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
|
- 'application/vnd.ms-excel',
|
|
|
|
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
|
- 'application/vnd.ms-powerpoint',
|
|
|
|
|
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
|
];
|
|
];
|
|
|
return allowedTypes.includes(file.type);
|
|
return allowedTypes.includes(file.type);
|