使用ElementUI el-upload上传文件
html页面
<el-upload accept='.jpg,.jpeg,.png,.gif' class="upload-demo" drag action="/safemanage/ipinfo/upload"
:beforeUpload="beforeAvatarUpload" :http-request="imgUpload" :on-success="handleproSuccess" multiple
:limit="1" :file-list="imageList" :disabled='dis'>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
</el-upload>
<img v-if="imageUrl" :src="imageUrl" class="avatar" width='150px' height="150px"> //这是用来编辑回显图片
script
beforeAvatarUpload(file) { },
handleproSuccess(res, file) { },
imgUpload(param