fix: 切换到单次模式时自动重置椰子油滴数(>30滴→10滴)
Some checks failed
PR Preview / teardown-preview (pull_request) Has been skipped
Test / unit-test (push) Successful in 5s
Test / build-check (push) Successful in 4s
PR Preview / test (pull_request) Successful in 5s
Test / e2e-test (push) Has been cancelled
PR Preview / deploy-preview (pull_request) Successful in 14s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 18:21:01 +00:00
parent ad65d7a8a9
commit d54f807e60

View File

@@ -456,10 +456,14 @@ const formDilution = ref(6)
const formCocoRow = ref(null)
watch(() => formVolume.value, (vol) => {
watch(() => formVolume.value, (vol, oldVol) => {
if (vol && !formCocoRow.value && parsedCurrentIndex.value < 0) {
formCocoRow.value = { oil: '椰子油', drops: vol === 'single' ? 10 : 0, _search: '椰子油', _open: false }
}
// Switching to single: reset coconut drops if they're too large (leftover from fill mode)
if (vol === 'single' && formCocoRow.value && formCocoRow.value.drops > 30) {
formCocoRow.value.drops = 10
}
})
// EO ingredients (everything except coconut)