fix: 复制接口用例没反应

This commit is contained in:
chenjianxing 2020-12-17 15:56:54 +08:00
parent ab7c863acc
commit 65b702c9b5
2 changed files with 12 additions and 7 deletions

View File

@ -149,7 +149,7 @@
},
copyCase(data) {
let obj = {name: "copy_" + data.name, priority: data.priority, active: false, request: data.request};
this.apiCaseList.unshift(obj);
this.$emit('copyCase', obj);
},
selectTestCase(item, $event) {

View File

@ -21,12 +21,13 @@
<el-main v-loading="batchLoading" style="overflow: auto">
<div v-for="(item,index) in apiCaseList" :key="index">
<api-case-item v-loading="singleLoading && singleRunId === item.id"
@refresh="getApiTest"
@singleRun="singleRun"
@showExecResult="showExecResult"
:is-case-edit="isCaseEdit"
:api="api"
:api-case="item" :index="index"/>
@refresh="getApiTest"
@singleRun="singleRun"
@copyCase="copyCase"
@showExecResult="showExecResult"
:is-case-edit="isCaseEdit"
:api="api"
:api-case="item" :index="index"/>
</div>
</el-main>
</el-container>
@ -187,6 +188,10 @@
}
},
copyCase(data) {
this.apiCaseList.unshift(data);
},
handleClose() {
this.visible = false;
},