From d38582167bf55430fca60179bdd8b39f0a32f8f7 Mon Sep 17 00:00:00 2001 From: Hera Zhao Date: Fri, 10 Apr 2026 16:32:31 +0000 Subject: [PATCH] =?UTF-8?q?UI:=20=E5=AE=B9=E9=87=8F=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E7=BC=A9=E5=B0=8F=E3=80=81=E8=87=AA=E5=AE=9A=E4=B9=89=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E7=A9=BA=E3=80=81=E4=BF=9D=E5=AD=98=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E3=80=81=E6=AF=94=E4=BE=8B=E6=8F=90=E7=A4=BA=E5=8A=A0"?= =?UTF-8?q?=E6=97=B6=EF=BC=8C"?= 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/components/RecipeDetailOverlay.vue | 2 +- frontend/src/views/RecipeManager.vue | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/RecipeDetailOverlay.vue b/frontend/src/components/RecipeDetailOverlay.vue index 7aa2024..c83625a 100644 --- a/frontend/src/components/RecipeDetailOverlay.vue +++ b/frontend/src/components/RecipeDetailOverlay.vue @@ -165,7 +165,7 @@ - 纯精油总数约为 {{ editorSuggestedEo }} 滴,现在为 {{ editorEoDrops }} 滴 + 时,纯精油总数约为 {{ editorSuggestedEo }} 滴,现在为 {{ editorEoDrops }} 滴 diff --git a/frontend/src/views/RecipeManager.vue b/frontend/src/views/RecipeManager.vue index 6dc5d36..7e26614 100644 --- a/frontend/src/views/RecipeManager.vue +++ b/frontend/src/views/RecipeManager.vue @@ -253,7 +253,7 @@ - 纯精油总数约为 {{ suggestedEoDrops }} 滴,现在为 {{ eoTotalDrops }} 滴 + 时,纯精油总数约为 {{ suggestedEoDrops }} 滴,现在为 {{ eoTotalDrops }} 滴 @@ -433,7 +433,7 @@ const newIngSearch = ref('') const newIngDrops = ref(1) const newIngDropdownOpen = ref(false) const formVolume = ref('30') -const formCustomVolume = ref(100) +const formCustomVolume = ref(null) const formCustomUnit = ref('drops') const formDilution = ref(6) @@ -764,6 +764,7 @@ function resetForm() { newIngSearch.value = '' newIngDrops.value = 1 formVolume.value = '30' + formCustomVolume.value = null formDilution.value = 6 } @@ -933,6 +934,10 @@ function toggleFormTag(tag) { } async function saveCurrentRecipe() { + if (formVolume.value === 'custom' && !formCustomVolume.value) { + ui.showToast('请输入自定义容量') + return + } const eoIngs = formIngredients.value.filter(i => i.oil && i.oil !== '椰子油' && i.drops > 0) if (!formName.value.trim()) { ui.showToast('请输入配方名称') @@ -1706,7 +1711,7 @@ watch(() => recipeStore.recipes, () => { .action-btn-primary:hover { opacity: 0.9; } .action-btn-sm { padding: 5px 12px; font-size: 12px; } .volume-controls { display: flex; gap: 6px; margin-bottom: 8px; } -.volume-btn { flex: 1; padding: 6px 0; border: 1.5px solid #d4cfc7; border-radius: 8px; background: #fff; font-size: 13px; cursor: pointer; font-family: inherit; color: #6b6375; text-align: center; } +.volume-btn { flex: 1; padding: 4px 0; border: 1px solid #d4cfc7; border-radius: 6px; background: #fff; font-size: 12px; cursor: pointer; font-family: inherit; color: #6b6375; text-align: center; } .volume-btn.active { background: #e8f5e9; border-color: #7ec6a4; color: #2e7d5a; font-weight: 600; } .volume-btn:hover { border-color: #7ec6a4; } .custom-volume-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }