<el-upload
class="annaul-ticket-imgs"
:class="{ 'hide-upload-btn': hideUploadBtn }"
:headers="{ token: token }"
:action="ATactionUrl"
list-type="picture-card"
:on-success="uploadImgSuccess"
:on-remove="uploadImgRemove"
:before-upload="uploadImgBefore"
:on-preview="handlePictureCardPreview"
:on-change="handleEditChange"
:on-exceed="handleExceed"
:limit="5"
:file-list="ruleForm.photoUrls"
>
<i class="el-icon-plus"></i>
<div slot="tip" class="form-tips">
上传格式.jpg/.png,最多上传5张,最大上传2M
</div>
</el-upload>
<el-dialog :visible.sync="uploadImgDialog">
<img width="100%" :src="uploadImageUrl" >
</el-dialog>
handleEditChange(file, fileList) {
this.hideUploadBtn = fileList.length >= 5
},
uploadImgRemove(file, fileList) {
this.hideUploadBtn = fileList.length >= 5
},
.annaul-ticket-imgs {
&.hide-upload-btn {
/deep/.el-upload--picture-card {
display: none;
}
}
}
|