// class来设置动态样式,根据css来取消加号
<el-upload
:class="{ disabled: uploadDisabled }"
action
:auto-upload="false"
list-type="picture-card"
:on-preview="handlePreview"
:before-remove="beforeRemove"
:on-change="uploadSectionFile"
:on-remove="handleRemove"
:limit="1"
ref="businessLicense"
:file-list="photoList"
>
<i class="el-icon-plus"></i>
</el-upload>
uploadSectionFile(file, fileList) {
if (fileList.length >= 1) {
this.uploadDisabled = true;
}
},
handleRemove(file) {
this.uploadDisabled = false;
},
/deep/ .disabled .el-upload--picture-card {
display: none !important;
}