fix(接口测试): 后置提取切换重复添加空行修复

This commit is contained in:
baiqi 2024-11-21 18:28:56 +08:00 committed by 刘瑞斌
parent 5ee4a88cdf
commit 454ccccea8
1 changed files with 8 additions and 1 deletions

View File

@ -373,7 +373,7 @@
:params="condition.extractors" :params="condition.extractors"
:disabled-except-param="props.disabled" :disabled-except-param="props.disabled"
:disabled-param-value="props.disabled" :disabled-param-value="props.disabled"
:default-param-item="defaultExtractParamItem" :default-param-item="defaultItem"
:columns="extractParamsColumns" :columns="extractParamsColumns"
:selectable="false" :selectable="false"
:scroll="{ x: '700px' }" :scroll="{ x: '700px' }"
@ -896,6 +896,13 @@
width: 80, 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) { function handleExtractParamTableChange(resultArr: any[], isInit?: boolean) {
condition.value.extractors = [...resultArr]; condition.value.extractors = [...resultArr];