diff --git a/api-test/frontend/src/business/automation/scenario/api/AddApiCase.vue b/api-test/frontend/src/business/automation/scenario/api/AddApiCase.vue index a63b22bad2..5395f02c95 100644 --- a/api-test/frontend/src/business/automation/scenario/api/AddApiCase.vue +++ b/api-test/frontend/src/business/automation/scenario/api/AddApiCase.vue @@ -45,7 +45,11 @@ export default { , methods: { saveApi() { - this.saveCase(this.httpForm); + this.$refs.httpForm.validate(async (valid) => { + if (valid) { + this.saveCase(this.httpForm); + } + }); }, saveCase(api) { let obj = { @@ -111,7 +115,7 @@ export default { }, open(api) { if (api) { - this.httpForm = api; + this.httpForm = JSON.parse(JSON.stringify(api)); this.httpVisible = true; } },