修改watch监听值

This commit is contained in:
hupeng
2021-05-18 16:42:15 +08:00
parent 19bae5c92b
commit edb4ae6a21
2 changed files with 10 additions and 6 deletions

View File

@ -253,7 +253,7 @@ export default {
image: null,
otPrice: null,
price: null,
cform: null
}
},
formValidate: {
@ -394,10 +394,11 @@ export default {
this.formValidate.images = val.join(',')
}
},
'form1.good': {
'form1.good.productId': {
handler(val,oldVal){
console.log(val)
this.getInfoChooseGood (val.productId)
if(val){
this.getInfoChooseGood (val)
}
},
},
},

View File

@ -396,9 +396,12 @@ export default {
this.formValidate.images = val.join(',')
}
},
'form1.good': {
'form1.good.productId': {
handler(val,oldVal){
this.getInfoChooseGood (val.cform.id)
if(val){
this.getInfoChooseGood (val)
}
},
},
},