From 454ccccea844d3b8ea86715fa32643fcbafdb9bc Mon Sep 17 00:00:00 2001 From: baiqi Date: Thu, 21 Nov 2024 18:28:56 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=90=8E=E7=BD=AE=E6=8F=90=E5=8F=96=E5=88=87=E6=8D=A2=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E6=B7=BB=E5=8A=A0=E7=A9=BA=E8=A1=8C=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/api-test/components/condition/content.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/api-test/components/condition/content.vue b/frontend/src/views/api-test/components/condition/content.vue index ac9bf63e44..e49684024d 100644 --- a/frontend/src/views/api-test/components/condition/content.vue +++ b/frontend/src/views/api-test/components/condition/content.vue @@ -373,7 +373,7 @@ :params="condition.extractors" :disabled-except-param="props.disabled" :disabled-param-value="props.disabled" - :default-param-item="defaultExtractParamItem" + :default-param-item="defaultItem" :columns="extractParamsColumns" :selectable="false" :scroll="{ x: '700px' }" @@ -896,6 +896,13 @@ width: 80, }, ]; + const defaultItem = ref( + cloneDeep( + condition.value.extractors?.length + ? condition.value.extractors[condition.value.extractors.length - 1] + : defaultExtractParamItem + ) + ); function handleExtractParamTableChange(resultArr: any[], isInit?: boolean) { condition.value.extractors = [...resultArr];