diff --git a/src/components/formula/HomeFormulaConfig.vue b/src/components/formula/HomeFormulaConfig.vue index 6e5b913..3a64a47 100644 --- a/src/components/formula/HomeFormulaConfig.vue +++ b/src/components/formula/HomeFormulaConfig.vue @@ -49,7 +49,7 @@ const size = 'default'
- + { - runtimeFormRef.value.validate((valid: any) => { - if (valid) { - return convertValuesToString(formData.value, 'name') - } - return null - }) +const saveFormData = async () => { + const valid = await runtimeFormRef.value.validate + if (valid) { + return convertValuesToString(formData.value, 'name') + } + return null } +defineExpose({ saveFormData }) /** * 注册孙子组件方法的注入函数 */ @@ -34,8 +34,9 @@ const labelUnitMap: Record = formulaStore.labelUnitMap /** * 监听事件 */ -watchEffect(() => { - formData.value = convertValuesToInt(formulaStore.getRealtimeConfig()) +watchEffect(async () => { + formData.value = (await formulaStore.getRealtimeConfig()).rely + console.log(formData.value) }) /** * 配方配置列表 @@ -153,6 +154,9 @@ const validatePass = (rule: any, value: any, callback: any, config: Formula.Form text-align: left; height: 40px; } +:deep(.el-select__wrapper) { + height: 42px; +} :deep(.el-form-item) { margin-right: 0; align-items: center; diff --git a/src/components/home/HomeFormula.vue b/src/components/home/HomeFormula.vue index 37b231b..9ab3abf 100644 --- a/src/components/home/HomeFormula.vue +++ b/src/components/home/HomeFormula.vue @@ -14,11 +14,11 @@ watchEffect(() => {