From 7d05194b947bc9027083741a0d54e7e76691aefa Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 14 Mar 2024 10:53:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E5=8F=AA=E8=BE=93=E5=85=A5=E5=8F=82=E6=95=B0=E5=80=BC=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E4=BC=9A=E5=A2=9E=E5=8A=A0=E6=96=B0=E7=9A=84=E4=B8=80?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1037126 --user=王孝刚 【接口测试】建议优化无效参数给出提示信息 https://www.tapd.cn/55049933/s/1474454 --- frontend/src/views/api-test/components/paramTable.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/api-test/components/paramTable.vue b/frontend/src/views/api-test/components/paramTable.vue index 4221ee2e98..85e24b4883 100644 --- a/frontend/src/views/api-test/components/paramTable.vue +++ b/frontend/src/views/api-test/components/paramTable.vue @@ -690,7 +690,7 @@ /** * 当表格输入框变化时,给参数表格添加一行数据行 * @param val 输入值 - * @param key 当前列的 key + * @param key 当前列的 key key存在的时候 才可以增加新的一行 * @param isForce 是否强制添加 */ function addTableLine(rowIndex: number, addLineDisabled?: boolean, isInit?: boolean) { @@ -698,7 +698,7 @@ emitChange('addTableLine addLineDisabled', isInit); return; } - if (rowIndex === paramsData.value.length - 1) { + if (rowIndex === paramsData.value.length - 1 && paramsData.value[rowIndex].key) { // 最后一行的更改才会触发添加新一行 const id = new Date().getTime().toString(); paramsData.value.push({