|
@ -51,13 +51,8 @@ watch(() => selectedIndex.value, () => { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
const initFormulaList = () => { |
|
|
const initFormulaList = () => { |
|
|
if (formulaStore.formulaList && formulaStore.formulaList.length) { |
|
|
|
|
|
recipes.value = formulaStore.formulaList as Formula.FormulaItem[] |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
formulaStore.initFormulaList() |
|
|
formulaStore.initFormulaList() |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
const selectRecipe = (item: Formula.FormulaItem, index: number) => { |
|
|
const selectRecipe = (item: Formula.FormulaItem, index: number) => { |
|
|
selectedIndex.value = index |
|
|
selectedIndex.value = index |
|
|
formulaStore.updateSelectedIndex(index) |
|
|
formulaStore.updateSelectedIndex(index) |
|
|