feat: 新功能改进 #20
@@ -165,7 +165,7 @@
|
||||
<select v-model.number="dilutionRatio" class="editor-select" style="width:60px">
|
||||
<option v-for="n in [3,4,5,6,7,8,9,10,12,15,20]" :key="n" :value="n">{{ n }}</option>
|
||||
</select>
|
||||
<span class="ratio-hint">纯精油总数约为 {{ editorSuggestedEo }} 滴,现在为 {{ editorEoDrops }} 滴</span>
|
||||
<span class="ratio-hint">时,纯精油总数约为 {{ editorSuggestedEo }} 滴,现在为 {{ editorEoDrops }} 滴</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
<select v-model.number="formDilution" class="select-sm">
|
||||
<option v-for="n in [3,4,5,6,7,8,9,10,12,15,20]" :key="n" :value="n">{{ n }}</option>
|
||||
</select>
|
||||
<span class="ratio-hint">纯精油总数约为 {{ suggestedEoDrops }} 滴,现在为 {{ eoTotalDrops }} 滴</span>
|
||||
<span class="ratio-hint">时,纯精油总数约为 {{ suggestedEoDrops }} 滴,现在为 {{ eoTotalDrops }} 滴</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user