class="upload-demo"
:action="uploadUrl"
:data="upLoadObj"
name="file_upload"
:show-file-list="false"
:on-success="handleAvatarSuccess"
>
v-if="imageUrl"
:src="imageUrl"
class="avatar"
style="width:360px;height:184px;"
/>
//参数
imageUrl: '',
uploadUrl: this.$url + '/brand/upload/uploadFile',
upLoadObj: {
album_id: '0',
file_type: '0',
type: '1,2,3,4'
},
handleAvatarSuccess(res, file) {
console.log(res, URL.createObjectURL(file.raw), 'handleAvatarSuccess');
this.imageUrl = URL.createObjectURL(file.raw);
},
.avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
text-align: center;
line-height: 178px;
}
// 自定义上传图片
upLoad(param) {
let thiz = this;
console.log(param, '自定义上传图片');
let formData