From 24e8aea39c3ebae9533785a0230517edd7850ffd Mon Sep 17 00:00:00 2001 From: Hera Zhao Date: Mon, 13 Apr 2026 18:17:43 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20eoDrops=E5=8F=98=E9=87=8F=E6=8F=90?= =?UTF-8?q?=E5=88=B0volume=E5=88=86=E6=94=AF=E5=A4=96=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=BC=96=E8=BE=91=E9=85=8D=E6=96=B9=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/views/RecipeManager.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/RecipeManager.vue b/frontend/src/views/RecipeManager.vue index 26549ca..1bf4969 100644 --- a/frontend/src/views/RecipeManager.vue +++ b/frontend/src/views/RecipeManager.vue @@ -777,15 +777,15 @@ function editRecipe(recipe) { const coco = ings.find(i => i.oil === '椰子油') if (coco) { formCocoRow.value = { ...coco, _search: '椰子油', _open: false } + const eoDrops = ings.filter(i => i.oil && i.oil !== '椰子油').reduce((s, i) => s + (i.drops || 0), 0) // Use stored volume if available, otherwise guess from drops if (recipe.volume) { formVolume.value = recipe.volume if (recipe.volume === 'custom') { - const totalDrops = ings.reduce((s, i) => s + (i.drops || 0), 0) + const totalDrops = eoDrops + coco.drops formCustomVolume.value = Math.round(totalDrops / DROPS_PER_ML) } } else { - const eoDrops = ings.filter(i => i.oil && i.oil !== '椰子油').reduce((s, i) => s + (i.drops || 0), 0) const totalDrops = eoDrops + coco.drops const ml = totalDrops / DROPS_PER_ML if (ml <= 2) formVolume.value = 'single'