中台端 油站配置 编辑油站 5张图片隐藏上传狂

This commit is contained in:
zhaotianfeng 2024-09-15 13:30:40 +08:00
parent 53c1254eca
commit 2d7980361b

View File

@ -175,7 +175,7 @@
<el-upload
:action="uploadAction"
list-type="picture-card"
:class="{hide:hideUpload}"
:class="{hide2:hideUpload2}"
:file-list="uploadImages"
:headers="uploadHeader"
:auto-upload="true"
@ -232,6 +232,8 @@
props: ["id"],
data(){
return{
//
hideUpload2:false,
dataForm:{coverImage:''},
//
// uploadAction: 'http://192.168.0.178:8008/backendApi/file/upload',
@ -319,7 +321,21 @@
}
}
},
watch: {
// uploadImages
'uploadImages.length'(val) {
this.$nextTick(() => {
if (val>=5){
this.$nextTick(() => {
this.hideUpload2=true
});
}
if (val<=5){
this.hideUpload2=false
}
});
}
},
computed: {
uploadAction(){
@ -587,5 +603,9 @@
line-height: 60px;
}
/deep/.hide2 .el-upload--picture-card{
display: none;
}
</style>