|
@ -17,7 +17,10 @@ onMounted(() => { |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
watchEffect(() => { |
|
|
watchEffect(() => { |
|
|
recipes.value = formulaStore.formulaList as Formula.FormulaItem[] |
|
|
|
|
|
|
|
|
recipes.value = formulaStore.formulaList |
|
|
|
|
|
if (formulaStore.formulaList) { |
|
|
|
|
|
selectedIndex.value = formulaStore.formulaList.length - 1 |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
const initFormulaList = () => { |
|
|
const initFormulaList = () => { |
|
@ -31,6 +34,7 @@ const initFormulaList = () => { |
|
|
|
|
|
|
|
|
const selectRecipe = (item: Formula.FormulaItem, index: number) => { |
|
|
const selectRecipe = (item: Formula.FormulaItem, index: number) => { |
|
|
selectedIndex.value = selectedIndex.value === index ? null : index |
|
|
selectedIndex.value = selectedIndex.value === index ? null : index |
|
|
|
|
|
console.log('selectedIndex--', selectedIndex) |
|
|
item = convertValuesToInt(item) as Formula.FormulaItem |
|
|
item = convertValuesToInt(item) as Formula.FormulaItem |
|
|
formulaStore.updateSelectedFormulaData(item) |
|
|
formulaStore.updateSelectedFormulaData(item) |
|
|
} |
|
|
} |
|
|