From 341cdb60bf75c3f648c2bbfc7d5f71bf1658f7c2 Mon Sep 17 00:00:00 2001 From: Hera Zhao Date: Sat, 11 Apr 2026 22:56:18 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=9A=E9=85=8D=E6=96=B9=E8=B7=B3?= =?UTF-8?q?=E8=BF=87=E9=87=8D=E5=90=8D=E6=97=B6=E6=AD=A3=E7=A1=AE=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E4=B8=8B=E4=B8=80=E6=9D=A1=EF=BC=8C=E4=B8=8D=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E6=95=B0=E6=8D=AE?= 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 | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/RecipeManager.vue b/frontend/src/views/RecipeManager.vue index 9e25e79..72e5cc5 100644 --- a/frontend/src/views/RecipeManager.vue +++ b/frontend/src/views/RecipeManager.vue @@ -1052,12 +1052,28 @@ async function saveCurrentRecipe() { if (result === false) { // Skipped — but if in multi-recipe queue, load next if (parsedCurrentIndex.value >= 0) { - parsedRecipes.value.splice(parsedCurrentIndex.value, 1) + const skipIdx = parsedCurrentIndex.value + // Prevent syncFormToParsed from overwriting next recipe + parsedCurrentIndex.value = -1 + parsedRecipes.value.splice(skipIdx, 1) if (parsedRecipes.value.length > 0) { - loadParsedIntoForm(Math.min(parsedCurrentIndex.value, parsedRecipes.value.length - 1)) + const next = Math.min(skipIdx, parsedRecipes.value.length - 1) + parsedCurrentIndex.value = next + formName.value = parsedRecipes.value[next].name + const cocoIng = parsedRecipes.value[next].ingredients.find(i => i.oil === '椰子油') + const eoIngs = parsedRecipes.value[next].ingredients.filter(i => i.oil !== '椰子油') + formIngredients.value = eoIngs.length > 0 + ? eoIngs.map(i => ({ ...i, _search: i.oil, _open: false })) + : [{ oil: '', drops: 1, _search: '', _open: false }] + if (cocoIng) { + formCocoRow.value = { oil: '椰子油', drops: cocoIng.drops, _search: '椰子油', _open: false } + formVolume.value = 'single' + } else { + formCocoRow.value = null + formVolume.value = '' + } ui.showToast('已跳过,请处理下一条') } else { - parsedCurrentIndex.value = -1 closeOverlay() } }