项目部授权-增加支持图片pdf上传

This commit is contained in:
bb_pan 2025-11-14 10:43:52 +08:00
parent ac94e404f7
commit 4c583e40c0
1 changed files with 5 additions and 5 deletions

View File

@ -174,7 +174,7 @@
:on-success="handleParseSuccess" :on-success="handleParseSuccess"
:on-error="handleError" :on-error="handleError"
:on-remove="handleFileRemove" :on-remove="handleFileRemove"
accept=".docx" accept=".docx, .pdf, image/*"
:before-upload="beforeUploadDocx" :before-upload="beforeUploadDocx"
:disabled="isEditMode" :disabled="isEditMode"
style="margin-right: 10px" style="margin-right: 10px"
@ -733,10 +733,10 @@ export default {
file.type === file.type ===
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
if (!isDocx || !isWordMime) { // if (!isDocx || !isWordMime) {
this.$message.error('只能上传.docx格式的文件') // this.$message.error('.docx')
return false // // return false //
} // }
// 10MB // 10MB
const isLt10M = file.size / 1024 / 1024 < 10 const isLt10M = file.size / 1024 / 1024 < 10