diff --git a/src/views/product/add_shop.vue b/src/views/product/add_shop.vue index 978f4d1..ce2d562 100644 --- a/src/views/product/add_shop.vue +++ b/src/views/product/add_shop.vue @@ -16,6 +16,9 @@ + + + @@ -323,7 +326,7 @@ - @@ -402,6 +405,7 @@ export default { id: "", typeEnum: "normal", name: "", + shortTitle:"",//商品介绍 unitId: "", unitName: "", categoryId: "", // 商品分类id @@ -563,8 +567,14 @@ export default { }, // 确认批量修改规格 batchNumberFormConfirm() { - this.form.skuList.map(item => { - item[this.batchNumberKey] = this.batchNumberForm.batchNumber; + console.log(this.form.skuList) + this.form.skuList.map((item,index) => { + //解决vue2列表数据更新视图未变化问题 + let newitem = {...item} + newitem[this.batchNumberKey] = this.batchNumberForm.batchNumber; + + this.$set( this.form.skuList, index, {...newitem}) + // item[this.batchNumberKey] = this.batchNumberForm.batchNumber; }); this.showBatchModal = false; this.batchNumberForm.batchNumber = 0;