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 } )