mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-08 07:38:26 -05:00
search
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<v-main>
|
<v-main>
|
||||||
<v-container class="pa-0 ma-0">
|
<v-container class="pa-0 ma-0 mb-2">
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
</v-container>
|
</v-container>
|
||||||
</v-main>
|
</v-main>
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
<Step :step="s"></Step>
|
<Step :step="s"></Step>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
<RecipeActivity :recipe="recipe"></RecipeActivity>
|
<!-- <RecipeActivity :recipe="recipe"></RecipeActivity>-->
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -10,6 +10,11 @@ import RecipeView from "@/components/display/RecipeView.vue";
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "RecipeSearchPage",
|
name: "RecipeSearchPage",
|
||||||
components: {RecipeView},
|
components: {RecipeView},
|
||||||
|
watch: {
|
||||||
|
id: function (newValue) {
|
||||||
|
this.refreshData(newValue)
|
||||||
|
},
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
id: {type: String, required: true}
|
id: {type: String, required: true}
|
||||||
},
|
},
|
||||||
@@ -19,10 +24,15 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const api = new ApiApi()
|
this.refreshData(this.id)
|
||||||
api.retrieveRecipe({id: this.id}).then(r => {
|
},
|
||||||
this.recipe = r
|
methods: {
|
||||||
})
|
refreshData(recipeId: string) {
|
||||||
|
const api = new ApiApi()
|
||||||
|
api.retrieveRecipe({id: recipeId}).then(r => {
|
||||||
|
this.recipe = r
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user