feat: dynamic import recipe.json
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<script lang="ts" setup>
|
||||
import type { DbRecipeItem } from 'utils/db'
|
||||
import { tools } from '~/data/food'
|
||||
import type { RecipeItem } from '~/types'
|
||||
import { getEmojisFromStuff } from '~/utils'
|
||||
|
||||
const props = defineProps<{
|
||||
dish: RecipeItem
|
||||
dish: RecipeItem | DbRecipeItem
|
||||
}>()
|
||||
|
||||
const gtm = useGtm()
|
||||
|
||||
Reference in New Issue
Block a user