<el-upload
action="http://192.168.1.33:8888/ImageServer/YmUpload_image"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:http-request="loadImg"
:class="{hide:hideUpload}"
:on-change="handleEditChange"
:limit="6">
<i class="el-icon-plus"></i>
</el-upload>
data() {
return {
hideUpload: false
}
}
handleRemove(file, fileList) {
this.hideUpload = fileList.length >= 6
},
handleEditChange (file, fileList) {
this.hideUpload = fileList.length >= 6
}
<style>
.hide .el-upload--picture-card {
display: none;
}
</style>