Allow add ingredient
This commit is contained in:
parent
377e0ef700
commit
61ec004360
1 changed files with 5 additions and 0 deletions
|
|
@ -27,6 +27,8 @@
|
|||
<button @click="deleteIngredient(ingredient)">Delete</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<button @click="addIngredient">Add Ingredient</button>
|
||||
<button class="submit-btn" @click="saveRecipe">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -168,6 +170,9 @@ export default {
|
|||
ingredients: [],
|
||||
image_urls: []
|
||||
}
|
||||
},
|
||||
addIngredient() {
|
||||
this.recipe.ingredients.push({ line: '', product: null });
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue