mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-06 14:48:02 -05:00
some basic views
This commit is contained in:
35
vue3/src/pages/RecipeViewPage.vue
Normal file
35
vue3/src/pages/RecipeViewPage.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<v-img max-height="15vh" :src="recipe.image"></v-img>
|
||||
<h3>{{ recipe.name }}</h3>
|
||||
{{ recipe.description }}
|
||||
|
||||
{{recipe}}
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent} from 'vue'
|
||||
import {ApiApi, Recipe} from "@/openapi";
|
||||
|
||||
export default defineComponent({
|
||||
name: "RecipeSearchPage",
|
||||
components: {},
|
||||
props: {
|
||||
id: Number
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
recipe: {} as Recipe
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
const api = new ApiApi()
|
||||
api.retrieveRecipe({id: this.id}).then(r => {
|
||||
this.recipe = r
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user