From c358d1670b0c567a78ccff89e242b111deebd725 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Fri, 4 Jul 2025 17:06:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B6=88=E6=AF=92=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=85=8D=E6=96=B9=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/formula/FormulaConfig.vue | 10 ++---- src/components/home/config.vue | 61 ++++++++++++-------------------- 2 files changed, 26 insertions(+), 45 deletions(-) diff --git a/src/components/formula/FormulaConfig.vue b/src/components/formula/FormulaConfig.vue index 6edb81e..b04283f 100644 --- a/src/components/formula/FormulaConfig.vue +++ b/src/components/formula/FormulaConfig.vue @@ -551,16 +551,12 @@ defineExpose({ .formData-input-config { width: 10vw; } -::v-deep .el-input__inner { +:deep(.el-input__inner) { text-align: left; -} -::v-deep .el-form-item { - margin-right: 0; -} -::v-deep .el-input__inner { height: 40px; } -::v-deep .el-form-item { +:deep(.el-form-item) { + margin-right: 0; align-items: center; } diff --git a/src/components/home/config.vue b/src/components/home/config.vue index e9e8ce9..d5c8726 100644 --- a/src/components/home/config.vue +++ b/src/components/home/config.vue @@ -70,13 +70,9 @@ const handleConfirm = (value: any) => { } console.log('value---', value) isModalOpen.value = false - let selectedFormula = {} - formulaStore.formulaList.forEach((item: Formula.FormulaItem) => { - if (item.formula_id === value) { - selectedFormula = item - } - }) - const selectedFormulaToInt = convertValuesToInt(selectedFormula) + const selectedFormula = formulaStore.formulaList.find((item: Formula.FormulaItem) => item.formula_id === value) + const selectedFormulaToInt = convertValuesToInt(selectedFormula!) + console.log('selectedFormulaToInt---', selectedFormulaToInt) formulaStore.updateSelectedFormulaDataByList(selectedFormulaToInt as Formula.FormulaItem) } @@ -108,25 +104,14 @@ const onDefaultFormula = () => {