移除图文添加watch 修复 图片图片已经添加还提示空的问题
This commit is contained in:
@ -68,11 +68,6 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'form.imageArr': function(val) {
|
||||
if (val) {
|
||||
this.form.imageInput = val.join(',')
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
cancel() {
|
||||
@ -80,6 +75,12 @@ export default {
|
||||
},
|
||||
doSubmit() {
|
||||
this.loading = true
|
||||
if(this.form.imageArr.length > 0){
|
||||
this.form.imageInput = this.form.imageArr.join(',')
|
||||
}else{
|
||||
this.form.imageInput = ''
|
||||
}
|
||||
|
||||
if (this.isAdd) {
|
||||
this.doAdd()
|
||||
} else this.doEdit()
|
||||
|
Reference in New Issue
Block a user