diff --git a/frontend/src/business/components/track/case/components/TestCaseList.vue b/frontend/src/business/components/track/case/components/TestCaseList.vue index 9ebbd70f26..1f6a4ad342 100644 --- a/frontend/src/business/components/track/case/components/TestCaseList.vue +++ b/frontend/src/business/components/track/case/components/TestCaseList.vue @@ -334,14 +334,10 @@ }, handleSelectAll(selection) { if (selection.length > 0) { - if (selection.length === 1) { - this.selectRows.add(selection[0]); - } else { - this.tableData.forEach(item => { - this.$set(item, "showMore", true); - this.selectRows.add(item); - }); - } + this.tableData.forEach(item => { + this.$set(item, "showMore", true); + this.selectRows.add(item); + }); } else { this.selectRows.clear(); this.tableData.forEach(row => { @@ -350,11 +346,6 @@ } }, handleSelectionChange(selection, row) { - // if (this.selectIds.has(row.id)) { - // this.selectIds.delete(row.id); - // } else { - // this.selectIds.add(row.id); - // } if (this.selectRows.has(row)) { this.$set(row, "showMore", false); this.selectRows.delete(row); @@ -362,17 +353,6 @@ this.$set(row, "showMore", true); this.selectRows.add(row); } - - let arr = Array.from(this.selectRows); - - // 选中1个以上的用例时显示更多操作 - if (this.selectRows.size === 1) { - this.$set(arr[0], "showMore", false); - } else if (this.selectRows.size === 2) { - arr.forEach(row => { - this.$set(row, "showMore", true); - }) - } }, importTestCase() { this.$refs.testCaseImport.open();