fix (接口定义): 创建用例展示问题修复

--bug=1006469 --user=赵勇 【github#6023】创建接... https://www.tapd.cn/55049933/s/1045857
This commit is contained in:
fit2-zhao 2021-09-13 13:57:43 +08:00 committed by fit2-zhao
parent 88836f6c80
commit ec9f05c7b9
2 changed files with 4 additions and 22 deletions

View File

@ -560,6 +560,9 @@ export default {
type: action,
api: api,
});
if(action === "ADD") {
this.activeTab = "api";
}
this.apiDefaultTab = newTabName;
},
debug(id) {
@ -650,7 +653,7 @@ export default {
row.tags = JSON.parse(row.tags);
}
}
this.handleTabsEdit(name, "ADD", row);
this.handleTabsEdit(name, "TEST", row);
},
mockConfig(data) {
let targetName = this.$t("commons.mock") + "-" + data.apiName;

View File

@ -220,27 +220,6 @@ export default {
} else {
this.addCase();
}
// this.$post("/api/testcase/list", this.condition, response => {
// let data = response.data;
// data.forEach(apiCase => {
// if (apiCase.tags && apiCase.tags.length > 0) {
// apiCase.tags = JSON.parse(apiCase.tags);
// this.$set(apiCase, 'selected', false);
// }
// if (Object.prototype.toString.call(apiCase.request).match(/\[object (\w+)\]/)[1].toLowerCase() !== 'object') {
// apiCase.request = JSON.parse(apiCase.request);
// }
// if (!apiCase.request.hashTree) {
// apiCase.request.hashTree = [];
// }
// });
// this.apiCaseList = data;
// if (apiCase) {
// this.copyCase(apiCase);
// } else {
// this.addCase();
// }
// });
},
apiCaseClose() {