more work on ItemInput

This commit is contained in:
2019-06-15 16:31:16 +02:00
parent aa23fd7077
commit b345faa517
2 changed files with 35 additions and 15 deletions

View File

@@ -5,7 +5,7 @@
Nouveau loot</p>
</div>
<div class="card-content">
<ItemInput></ItemInput>
<ItemInput @addItem="onAddItem"></ItemInput>
<p v-for="(item, idx) in looted" :key="idx"
class="has-text-left is-size-5">
{{ item }}
@@ -22,7 +22,12 @@
data () { return {
looted: [],
};
},
methods: {
onAddItem (item) {
this.looted.push(item);
}
}
}
</script>