properly implement editing items

This commit is contained in:
busti 2019-12-14 23:51:06 +01:00
parent 8981b99f6e
commit 388b243955
4 changed files with 18 additions and 11 deletions

View file

@ -3,7 +3,7 @@
<img class="img-fluid rounded mx-auto d-block mb-3" :src="`https://c3lf.de/api/1/thumbs/${item.file}`"/>
<h6>Editing Item <span class="badge badge-secondary">#{{ item[badge] }}</span></h6>
<form>
<div class="form-group" v-for="field in fields" :key="field">
<div class="form-group" v-for="field in ['bezeichnung', 'container']" :key="field">
<label>{{ field }}</label>
<input type="text" class="form-control" v-model="item[field]">
</div>
@ -14,9 +14,6 @@
<script>
export default {
name: 'Add',
props: ['item', 'badge', 'fields']
props: ['item', 'badge']
};
</script>
<style>
</style>