From 8091791fdeeaf1e2a1dfe6fde8ed23b9b6839d63 Mon Sep 17 00:00:00 2001 From: dmy Date: Tue, 3 Mar 2026 15:11:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E7=94=B5=E5=8E=8B?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=A0=87=E7=AD=BE=E5=B9=B6=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=94=B5=E5=8E=8B=E4=BB=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改电流类型标签为更准确的"电压类型 (AC/DC)" 根据AC/DC自动设置电压份数(DC为1,AC为3) 调整默认最大电流值为300 --- webui/src/components/ParameterForm.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/webui/src/components/ParameterForm.vue b/webui/src/components/ParameterForm.vue index e98b6e7..8a9dadb 100644 --- a/webui/src/components/ParameterForm.vue +++ b/webui/src/components/ParameterForm.vue @@ -35,7 +35,7 @@
交流(AC)或直流(DC),由电压等级自动判断 @@ -342,7 +342,7 @@ - +
@@ -377,7 +377,7 @@ const defaultParams: AllParameters = { }, optional: { voltage_n: 3, - max_i: 200 + max_i: 300 } } @@ -398,11 +398,14 @@ const currentType = computed(() => { return params.parameter.rated_voltage.includes('±') ? 'DC' : 'AC' }) -// 监听电压等级变化,同步更新 ac_or_dc 字段 +// 监听电压等级变化,同步更新 ac_or_dc 和 voltage_n 字段 watch( () => params.parameter.rated_voltage, (newVoltage) => { - params.parameter.ac_or_dc = newVoltage.includes('±') ? 'DC' : 'AC' + const isDC = newVoltage.includes('±') + params.parameter.ac_or_dc = isDC ? 'DC' : 'AC' + // DC 时电压份数为 1,AC 时为 3 + params.optional.voltage_n = isDC ? 1 : 3 }, { immediate: true } )