From 4fd4152bcf244affba9d3f64936ab30681eae606 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 21 Jun 2023 15:48:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=BA=E6=99=AF=E6=B8=85=E7=A9=BA=E6=96=AD?= =?UTF-8?q?=E8=A8=80=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1027300 --user=王孝刚 【接口测试】场景引用case和场景的原始断言-点击清空JSONPath断言-断言被删除了 https://www.tapd.cn/55049933/s/1384927 --- .../definition/components/assertion/ApiAssertions.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api-test/frontend/src/business/definition/components/assertion/ApiAssertions.vue b/api-test/frontend/src/business/definition/components/assertion/ApiAssertions.vue index eb7e8956a5..ff33c771f8 100644 --- a/api-test/frontend/src/business/definition/components/assertion/ApiAssertions.vue +++ b/api-test/frontend/src/business/definition/components/assertion/ApiAssertions.vue @@ -247,7 +247,12 @@ export default { this.assertions.jsonPath.push(jsonItem); }, clearJson() { - this.assertions.jsonPath = []; + if (this.assertions.jsonPath) { + const tmpArr = this.assertions.jsonPath.filter((item) => + !item.label + ); + this.assertions.jsonPath = tmpArr; + } }, }, };