From 0e530e5ba692c00b1a03d35107d1e6e03ab4bec0 Mon Sep 17 00:00:00 2001 From: Hera Zhao Date: Sun, 12 Apr 2026 13:53:34 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=85=8D=E6=96=B9=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E5=99=A8=E7=A6=81=E6=AD=A2=E9=87=8D=E5=A4=8D=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E7=B2=BE=E6=B2=B9?= 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/views/RecipeManager.vue b/frontend/src/views/RecipeManager.vue index 1057e8e..3ca66d8 100644 --- a/frontend/src/views/RecipeManager.vue +++ b/frontend/src/views/RecipeManager.vue @@ -864,6 +864,13 @@ function filteredOilNames(search) { } function selectOil(ing, name) { + // Check for duplicate oil in current recipe + const existing = formIngredients.value.find(i => i !== ing && i.oil === name) + if (existing) { + ui.showToast(`已有「${name}」,请直接修改滴数`) + ing._open = false + return + } ing.oil = name ing._search = name ing._open = false