fix: 拖选文字时弹窗不再误关闭 #27

Merged
hera merged 16 commits from fix/next-batch into main 2026-04-12 14:11:46 +00:00
Showing only changes of commit 0e530e5ba6 - Show all commits

View File

@@ -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