This commit is contained in:
fit2-zhao 2021-01-27 18:20:28 +08:00
commit b777a93cf5
3 changed files with 12 additions and 2 deletions

View File

@ -237,8 +237,18 @@
this.$refs.apiScenarioList.search(data);
},
refresh(data) {
this.setTabTitle(data);
this.$refs.apiScenarioList.search(data);
},
setTabTitle(data) {
for (let index in this.tabs) {
let tab = this.tabs[index];
if (tab.name === this.activeName) {
tab.label = data.name;
break;
}
}
},
editScenario(row) {
this.addTab({name: 'edit', currentScenario: row});
},

View File

@ -848,7 +848,7 @@
if (this.currentScenario.tags instanceof String) {
this.currentScenario.tags = JSON.parse(this.currentScenario.tags);
}
this.$emit('refresh');
this.$emit('refresh',this.currentScenario);
})
}
})

View File

@ -213,7 +213,7 @@
},
copyCase(data) {
let uuid = getUUID();
let obj = {name: "copy_" + data.name, priority: data.priority, active: true, request: data.request, uuid: uuid};
let obj = {name: "copy_" + data.name, priority: data.priority, active: true, tags: data.tags, request: data.request, uuid: uuid};
this.$emit('copyCase', obj);
},
selectTestCase(item, $event) {