This commit is contained in:
sschum 2023-07-13 14:58:28 +02:00
parent d8a4bd6af4
commit 0ad1ecbc14

View File

@ -19,6 +19,7 @@
<p>
Cards: {{ cards.length }}
Charcounter: {{ amountOfChars }}
Average Chars: {{ averageCharsAmount }}
</p>
<a href="#" class="btn btn-primary" v-on:click="addCard">Add Card</a>
</div>
@ -50,6 +51,11 @@
return this.cards.map(c => c.content.length).reduce((pv, cv) => pv + cv)
},
averageCharsAmount() {
if(this.amountOfChars === 0) return 0
return this.amountOfChars / this.cards.length
}
},
methods: {
addCard() {