|
@@ -39,7 +39,7 @@ const { dictData: writeFuncCode, getDictData: getWriteFuncCode } = useDictData(D
|
|
|
const { dictData: readFuncCode, getDictData: getReadFuncCode } = useDictData(DictCode.ReadFuncCode);
|
|
|
const { dictData: isHighFreqParam, getDictData: getIsHighFreqParam } = useDictData(DictCode.IsHighFreqParam);
|
|
|
|
|
|
-const customParamsForm = reactive<Partial<ProtocolParamInfo>>({
|
|
|
+const initialCustomParams: Partial<ProtocolParamInfo> = {
|
|
|
paramName: '',
|
|
|
gatewayParamName: '',
|
|
|
gatewayParamCode: '',
|
|
@@ -75,6 +75,10 @@ const customParamsForm = reactive<Partial<ProtocolParamInfo>>({
|
|
|
bitAddress3: '',
|
|
|
bitAddress3Status: '',
|
|
|
bitAddress3Detail: '',
|
|
|
+};
|
|
|
+
|
|
|
+const customParamsForm = reactive<Partial<ProtocolParamInfo>>({
|
|
|
+ ...initialCustomParams,
|
|
|
});
|
|
|
|
|
|
const rules = computed<FormRules<ProtocolParamInfo>>(() => {
|
|
@@ -261,7 +265,8 @@ const handleOk = () => {
|
|
|
};
|
|
|
|
|
|
const handleClose = () => {
|
|
|
- formRef.value?.resetFields();
|
|
|
+ formRef.value?.clearValidate();
|
|
|
+ Object.assign(customParamsForm, initialCustomParams);
|
|
|
};
|
|
|
|
|
|
defineExpose({
|