feat: dynamic import recipe.json

This commit is contained in:
YunYouJun
2023-07-30 20:59:52 +08:00
parent 38b31a5654
commit b526aae2d0
7 changed files with 26 additions and 23 deletions

View File

@@ -22,7 +22,9 @@ const { random, randomRecipes } = useRandomRecipe(count)
<div>随机一下</div>
</button>
<div m="t-8" flex="~ col">
<DishTag v-for="recipe, i in randomRecipes" :key="i" :dish="recipe" />
<template v-for="recipe, i in randomRecipes" :key="i">
<DishTag v-if="recipe" :dish="recipe" />
</template>
</div>
</div>
</template>