From e4d790a4f7d20d174850c2b8d70b3963dcd6c09c Mon Sep 17 00:00:00 2001 From: liudianxin Date: Fri, 19 Jun 2020 19:14:09 +0800 Subject: [PATCH] =?UTF-8?q?fix=E8=A1=A8=E6=A0=BC=E5=8B=BE=E9=80=89?= =?UTF-8?q?=E8=81=94=E5=8A=A8=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/shopping-cart/shopping-cart-cell.vue | 8 -------- src/components/table/table-um.vue | 5 +++-- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/components/shopping-cart/shopping-cart-cell.vue b/src/components/shopping-cart/shopping-cart-cell.vue index 51de29d..7491725 100644 --- a/src/components/shopping-cart/shopping-cart-cell.vue +++ b/src/components/shopping-cart/shopping-cart-cell.vue @@ -203,23 +203,16 @@ export default { getSpecification() { if (this.cellIsService) { let arr = []; - console.log( - this.cellItems.service.request_spcs_info - ); if ( this.cellItems.service.request_spcs_info && this.cellItems.service.request_spcs_info.length != 0 ) { - console.log("sss"); let requestArr = this.cellItems.service.request_spcs_info; requestArr.forEach(item => { - console.log(item); arr.push(item.id); }); } - console.log(arr); let num = arr.indexOf(this.cellItems.spec_id); - console.log(num); let specification = ""; if (num != -1) { specification = this.cellItems.service.request_spcs_info[num].des; @@ -240,7 +233,6 @@ export default { this.$emit("changeState", { state: val, index: this.cellIndex }); }, changeSpecification(val) { - console.log(val); this.specificationPop = val; }, changeSpecificationApplication(val) { diff --git a/src/components/table/table-um.vue b/src/components/table/table-um.vue index 3fb447e..9d37fa9 100644 --- a/src/components/table/table-um.vue +++ b/src/components/table/table-um.vue @@ -544,10 +544,10 @@ export default { let self = this; for (let i = 0; i < arr.length; i++) { if (arr[i].id == row.id) { - if (arr[i].selected) { + if (arr[i].selected && typeof arr[i].selected == "boolean") { arr[i].selected = state; } else { - arr[i].selected = 1; + arr[i].selected = true; } if (arr[i].children && arr[i].children.length != 0) { self.setChildren(arr[i].children, state); @@ -586,6 +586,7 @@ export default { for (let i = 0; i < arr.length; i++) { if (arr[i].id == pid) { self.$refs.cesTable.toggleRowSelection(arr[i], true); + arr[i].selected = true; self.getParent(self.metaData, arr[i].parentId); } if (arr[i].children && arr[i].children.length != 0) { -- 2.26.0