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; }