diff --git a/src/components/ChooseFood.vue b/src/components/ChooseFood.vue index c64b15d..ee71868 100644 --- a/src/components/ChooseFood.vue +++ b/src/components/ChooseFood.vue @@ -154,7 +154,7 @@ const clickTool = (item: StuffItem) => {
好的,今天我们来做菜! diff --git a/src/stores/recipe.ts b/src/stores/recipe.ts index 5201431..7ca68c5 100644 --- a/src/stores/recipe.ts +++ b/src/stores/recipe.ts @@ -25,11 +25,21 @@ export const useRecipeStore = defineStore('recipe', () => { curTools.value.add(name) } + /** + * 重置 + */ + function reset() { + curStuff.value.clear() + curTools.value.clear() + curTools.value.add('一口大锅') + } + return { selectedTools, selectedStuff, toggleStuff, toggleTools, + reset, } })