fix(测试计划): 修复选中一条用例时不显示更多操作按钮的问题
This commit is contained in:
parent
302a754f5b
commit
228bac8277
|
@ -1 +1 @@
|
||||||
Subproject commit cf6b06526324326a563d933e07118fac014a63b4
|
Subproject commit c2dacf960cdb1ed35664bdd3432120b1203b73d8
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue