Browse Source

2023-06-15 设备和质量修改3

java8
杨奉源 3 years ago
parent
commit
fa60ab04f5
  1. 12
      src/views/modules/eam/com_eam_object_upload_file.vue

12
src/views/modules/eam/com_eam_object_upload_file.vue

@ -20,7 +20,7 @@
drag
action="javascript:void(0);" ref="uploadFile" :limit="1"
:before-upload="beforeUploadHandle" :on-change="onChange"
accept=".jpg,.pdf,.PDF" :auto-upload="false"
accept="*" :auto-upload="false"
style="text-align: left;">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
@ -86,11 +86,11 @@ export default {
//
beforeUploadHandle(file) {
if (file.type !== 'image/jpg' && file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/gif' && file.type !== 'application/pdf') {
this.$message.error('只支持图片和PDF文档!')
return false
}
this.num++
// if (file.type !== 'image/jpg' && file.type !== 'image/jpeg' && file.type !== 'image/png' && file.type !== 'image/gif' && file.type !== 'application/pdf') {
// this.$message.error('PDF')
// return false
// }
// this.num++
},
/*选择上传文件时*/

Loading…
Cancel
Save