fix: curStuff watch

This commit is contained in:
YunYouJun
2023-11-07 00:12:56 +08:00
parent 5ab297cc47
commit 8ca8c4aac8
3 changed files with 238 additions and 111 deletions

View File

@@ -122,8 +122,9 @@ export const useRecipeStore = defineStore('recipe', () => {
// 默认严格模式
const displayedRecipe = ref<RecipeItem[]>([])
watch([keyword, curStuff, curTool, curMode], async () => {
displayedRecipe.value = await searchRecipes()
// fix curStuff watch
watch(() => [keyword.value, selectedStuff.value, curTool.value, curMode.value], async () => {
displayedRecipe.value = [...(await searchRecipes())]
})
/**