From 85bc5d7c21051a1facb8aa9428cfed4622c3de7f Mon Sep 17 00:00:00 2001 From: xuwenbo <717567226@qq.com> Date: Tue, 8 Sep 2020 22:58:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A7=92=E6=9D=80=E6=8B=BC?= =?UTF-8?q?=E5=9B=A2=E9=A1=B5=E9=9D=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/activity/combination/form.vue | 10 +++------- src/views/activity/seckill/form.vue | 6 +++--- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/views/activity/combination/form.vue b/src/views/activity/combination/form.vue index 2209489..42dbec8 100644 --- a/src/views/activity/combination/form.vue +++ b/src/views/activity/combination/form.vue @@ -384,7 +384,6 @@ export default { handler(val,oldVal){ this.getInfoChooseGood (val.cform.id) }, - deep:true//对象内部的属性监听,也叫深度监听 }, }, mounted () { @@ -419,7 +418,7 @@ export default { }, // 立即生成 generate (data) { - isFormatAttrForActivity(data===null?this.formValidate.id:data, { attrs: this.attrs }).then(res => { + isFormatAttrForActivity(data===null?this.formValidate.productId:data, { attrs: this.attrs }).then(res => { this.manyFormValidate = res.value; let headerdel = { title: '操作', @@ -506,13 +505,10 @@ export default { getInfo(id).then(async res => { let data = res.productInfo; if(data){ - let cate_id = parseInt(data.cate_id) || 0; that.attrs = data.items || []; that.formValidate = data; - that.id = that.combinationId - that.formValidate.id = 0; - that.formValidate.productId = data.id - that.formValidate.cate_id = cate_id; + that.formValidate.id = 0; + that.formValidate.productId = id that.formValidate.title = data.store_name that.formValidate.info = data.store_info that.formValidate.unitName = data.unit_name diff --git a/src/views/activity/seckill/form.vue b/src/views/activity/seckill/form.vue index d8f1e48..6f60bc0 100644 --- a/src/views/activity/seckill/form.vue +++ b/src/views/activity/seckill/form.vue @@ -385,7 +385,6 @@ export default { handler(val,oldVal){ this.getInfoChooseGood (val.cform.id) }, - deep:true//对象内部的属性监听,也叫深度监听 }, }, mounted () { @@ -423,7 +422,7 @@ export default { }, // 立即生成 generate (data) { - isFormatAttrForActivity(data===null?this.formValidate.id:data, { attrs: this.attrs }).then(res => { + isFormatAttrForActivity(data===null?this.formValidate.productId:data, { attrs: this.attrs }).then(res => { this.manyFormValidate = res.value; let headerdel = { title: '操作', @@ -514,7 +513,8 @@ export default { let cate_id = parseInt(data.cate_id) || 0; that.attrs = data.items || []; that.formValidate = data; - that.formValidate.id = 0; + that.formValidate.id = 0; + that.formValidate.productId = id that.formValidate.productId = data.id that.formValidate.cate_id = cate_id; that.oneFormValidate = [data.attr];