项目部授权-增加支持图片pdf上传
This commit is contained in:
parent
ac94e404f7
commit
4c583e40c0
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue