fix(测试计划): 修复选中一条用例时不显示更多操作按钮的问题

This commit is contained in:
shiziyuan9527 2020-09-27 11:31:44 +08:00
parent 302a754f5b
commit 228bac8277
2 changed files with 5 additions and 20 deletions

@ -1 +1 @@
Subproject commit cf6b06526324326a563d933e07118fac014a63b4 Subproject commit c2dacf960cdb1ed35664bdd3432120b1203b73d8

View File

@ -437,14 +437,10 @@
}, },
handleSelectAll(selection) { handleSelectAll(selection) {
if (selection.length > 0) { if (selection.length > 0) {
if (selection.length === 1) { this.tableData.forEach(item => {
this.selectRows.add(selection[0]); this.$set(item, "showMore", true);
} else { this.selectRows.add(item);
this.tableData.forEach(item => { });
this.$set(item, "showMore", true);
this.selectRows.add(item);
});
}
} else { } else {
this.selectRows.clear(); this.selectRows.clear();
this.tableData.forEach(row => { this.tableData.forEach(row => {
@ -460,17 +456,6 @@
this.$set(row, "showMore", true); this.$set(row, "showMore", true);
this.selectRows.add(row); 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);
})
}
}, },
handleBatch(type) { handleBatch(type) {
if (this.selectRows.size < 1) { if (this.selectRows.size < 1) {