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]; }