From 0b344aa46d503cd13b3648151e47b2cdef383f97 Mon Sep 17 00:00:00 2001 From: hupeng Date: Wed, 19 May 2021 11:30:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A0=8D=E4=BB=B7watch?= =?UTF-8?q?=E7=9B=91=E5=90=AC=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/activity/bargain/form.vue | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/views/activity/bargain/form.vue b/src/views/activity/bargain/form.vue index 5601330..09dacef 100644 --- a/src/views/activity/bargain/form.vue +++ b/src/views/activity/bargain/form.vue @@ -118,6 +118,11 @@ export default { templateList: [], form1: { good:{ + productId: null, + storeName: null, + image: null, + otPrice: null, + price: null, } }, form: { @@ -168,10 +173,10 @@ export default { } }, watch: { - 'form.imageArr': function(val) { - if (val && Array.isArray(val)) { - this.form.image = val.join(',') - } + 'form.image': function(val) { + this.form1.good.image = this.form.image + this.form1.good.productId = this.form.productId + }, 'form.sliderImageArr': function(val) { console.log("aaa:"+val) @@ -179,13 +184,16 @@ export default { this.form.images = val.join(',') } }, - 'form1.good': { + 'form1.good.productId': { handler(val,oldVal){ - this.getInfoChooseGood (val.cform.id) + if(val){ + this.getInfoChooseGood (val) + } }, deep:true//对象内部的属性监听,也叫深度监听 }, }, + methods: { // 详情选择商品生成规格用 getInfoChooseGood (id) {