From cab1b4d1e0aa7065f7bab706ecb9344a0ab2c64e Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Wed, 17 Apr 2024 13:19:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=8E=AF=E5=A2=83=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8E=AF=E5=A2=83=E7=AE=A1=E7=90=86=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E5=8F=82=E6=95=B0=E6=9F=A5=E8=AF=A2=E6=8A=A5=E9=94=99?= =?UTF-8?q?&=E6=B7=BB=E5=8A=A0=E6=96=AD=E8=A8=80=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/business/ms-assertion/comp/ScriptTab.vue | 5 +++-- frontend/src/components/business/ms-assertion/index.vue | 7 +++++++ .../environmental/components/allParams/index.vue | 8 ++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/business/ms-assertion/comp/ScriptTab.vue b/frontend/src/components/business/ms-assertion/comp/ScriptTab.vue index c415f25abc..dad1f389ef 100644 --- a/frontend/src/components/business/ms-assertion/comp/ScriptTab.vue +++ b/frontend/src/components/business/ms-assertion/comp/ScriptTab.vue @@ -1,5 +1,5 @@ - \ No newline at end of file + diff --git a/frontend/src/components/business/ms-assertion/index.vue b/frontend/src/components/business/ms-assertion/index.vue index 90d8b1d459..bf4f48ba8b 100644 --- a/frontend/src/components/business/ms-assertion/index.vue +++ b/frontend/src/components/business/ms-assertion/index.vue @@ -133,6 +133,7 @@ :disabled="props.disabled" @change="handleChange" @delete-script-item="deleteScriptItem" + @copy="copyItem" /> @@ -411,6 +412,12 @@ activeKey.value = item.id; }; + function copyItem() { + const tmpObj = { ...cloneDeep(getCurrentItemState.value), id: new Date().getTime().valueOf().toString() }; + assertions.value.push(tmpObj); + activeKey.value = tmpObj.id; + } + const handleChange = (val: any) => { switch (val.assertionType) { case ResponseAssertionType.RESPONSE_HEADER: diff --git a/frontend/src/views/project-management/environmental/components/allParams/index.vue b/frontend/src/views/project-management/environmental/components/allParams/index.vue index 181338aac0..c6f90d6cd5 100644 --- a/frontend/src/views/project-management/environmental/components/allParams/index.vue +++ b/frontend/src/views/project-management/environmental/components/allParams/index.vue @@ -7,12 +7,8 @@ class="w-[240px]" @search="handleSearch" @press-enter="handleSearch" + @clear="handleSearch" > - item.key.includes(searchValue.value) || item.tags.includes(searchValue.value) + (item) => item.key?.includes(searchValue.value) || (item.tags || []).includes(searchValue.value) ); innerParams.value = [...result]; }