This commit is contained in:
vabene1111
2024-02-28 17:55:11 +01:00
committed by smilerz
parent b4281aaf83
commit 1427dd989f
4 changed files with 514 additions and 12 deletions

View File

@@ -14,7 +14,7 @@
<v-main>
<v-container class="pa-0 ma-0">
<v-container class="pa-0 ma-0 mb-2">
<router-view></router-view>
</v-container>
</v-main>

View File

@@ -65,7 +65,7 @@
<Step :step="s"></Step>
</v-card>
<RecipeActivity :recipe="recipe"></RecipeActivity>
<!-- <RecipeActivity :recipe="recipe"></RecipeActivity>-->
</template>

File diff suppressed because one or more lines are too long

View File

@@ -10,6 +10,11 @@ import RecipeView from "@/components/display/RecipeView.vue";
export default defineComponent({
name: "RecipeSearchPage",
components: {RecipeView},
watch: {
id: function (newValue) {
this.refreshData(newValue)
},
},
props: {
id: {type: String, required: true}
},
@@ -19,10 +24,15 @@ export default defineComponent({
}
},
mounted() {
const api = new ApiApi()
api.retrieveRecipe({id: this.id}).then(r => {
this.recipe = r
})
this.refreshData(this.id)
},
methods: {
refreshData(recipeId: string) {
const api = new ApiApi()
api.retrieveRecipe({id: recipeId}).then(r => {
this.recipe = r
})
}
}
})
</script>