forked from extern/froscon-2023-demo
update
This commit is contained in:
parent
d8a4bd6af4
commit
0ad1ecbc14
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user