From d7ed999da6c208f86595575878a0f7434e0f4240 Mon Sep 17 00:00:00 2001 From: dmy Date: Mon, 2 Mar 2026 22:03:01 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=8C=E6=AD=A5=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=AF=BC=E7=BA=BF=E5=8F=82=E6=95=B0=E6=95=B0=E7=BB=84=E6=93=8D?= =?UTF-8?q?=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webui/src/components/ParameterForm.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/webui/src/components/ParameterForm.vue b/webui/src/components/ParameterForm.vue index e5f53ed..4812b90 100644 --- a/webui/src/components/ParameterForm.vue +++ b/webui/src/components/ParameterForm.vue @@ -350,29 +350,40 @@ const voltageOptions = [ ] // 数组操作函数(最多3条导线,即数组最多4个元素:1地线+3导线) +// 两个数组同步增减 const addHArm = () => { if (params.parameter.h_arm.length < 4) { const last = params.parameter.h_arm[params.parameter.h_arm.length - 1] || 100 params.parameter.h_arm.push(last - 20) + // 同步增加 gc_x + const lastX = params.parameter.gc_x[params.parameter.gc_x.length - 1] || 10 + params.parameter.gc_x.push(lastX) } } const removeHArm = () => { if (params.parameter.h_arm.length > 2) { params.parameter.h_arm.pop() + // 同步删除 gc_x + params.parameter.gc_x.pop() } } const addGcX = () => { if (params.parameter.gc_x.length < 4) { - const last = params.parameter.gc_x[params.parameter.gc_x.length - 1] || 10 - params.parameter.gc_x.push(last) + const lastX = params.parameter.gc_x[params.parameter.gc_x.length - 1] || 10 + params.parameter.gc_x.push(lastX) + // 同步增加 h_arm + const last = params.parameter.h_arm[params.parameter.h_arm.length - 1] || 100 + params.parameter.h_arm.push(last - 20) } } const removeGcX = () => { if (params.parameter.gc_x.length > 2) { params.parameter.gc_x.pop() + // 同步删除 h_arm + params.parameter.h_arm.pop() } }