diff --git a/components/associated.vue b/components/associated.vue index 3396775..afb3bf4 100644 --- a/components/associated.vue +++ b/components/associated.vue @@ -139,15 +139,13 @@ watch: { checkedObj: { handler(n) { - this.checkedArr = n - console.log('watch', this.checkedArr); + // this.checkedArr = n }, deep: true } }, mounted() { this.checkedArr = this.checkedObj - console.log('mounted', this.checkedArr); this.getBounht(); this.getCollect(); this.getBrowse(); @@ -288,20 +286,15 @@ /*点击选中与否*/ goodsCheck(item, index) { this.$set(item, 'check', !item.check); - console.log("Arr", this.checkedArr); if (item.check) { this.checkedArr.push(item) - console.log("增加", this.checkedArr) } else { - console.log("删除前", this.checkedArr); this.checkedArr.splice(this.checkedArr.findIndex(itemn => ((itemn.spu_id == item.spu_id) || (item.spu_id == ( itemn.spu && itemn.spu.spu_id)))), 1) - console.log("删除后", this.checkedArr); } }, /*确定提交*/ submit() { - console.log('提交', this.checkedArr); this.$emit('getProduct', this.checkedArr); }, }