fix (接口自动化): 优化同一个场景只能打开一个tab

This commit is contained in:
fit2-zhao 2021-08-11 19:11:33 +08:00 committed by fit2-zhao
parent cd575d83d6
commit 6124e904fd
3 changed files with 10 additions and 3 deletions

View File

@ -380,7 +380,12 @@ export default {
}
},
editScenario(row) {
this.addTab({name: 'edit', currentScenario: row});
const index = this.tabs.find(p => p.currentScenario.id === row.id);
if (!index) {
this.addTab({name: 'edit', currentScenario: row});
}else{
this.activeName = index.name;
}
},
nodeChange(node, nodeIds, pNodes) {

View File

@ -479,7 +479,9 @@ export default {
this.$nextTick(() => {
this.addListener();
});
this.$refs.refFab.openMenu();
if (!this.currentScenario.name) {
this.$refs.refFab.openMenu();
}
},
directives: {OutsideClick},
computed: {

@ -1 +1 @@
Subproject commit 8da3e5d33a1aff686266c86a380b626433476f1a
Subproject commit 34430c98ba5cbfefa6d911ef9be9f593a2368f69