mirror of
https://github.com/sschum/froscon-2023-demo.git
synced 2024-11-21 23:33:08 +01:00
update
This commit is contained in:
parent
c2ddb12140
commit
42db27c5d0
@ -20,11 +20,11 @@
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6" v-for="(card, i) of cards">
|
||||
<div class="card">
|
||||
<div class="col-6" v-for="(card, i) of cards" :key="card.id">
|
||||
<div class="card" v-on:click="removeCard(i)">
|
||||
<div :class="i % 2 === 0 ? 'bg-primary' : 'bg-secondary'">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">{{ card }}</h5>
|
||||
<h5 class="card-title">{{ card.content }} ({{ card.id }})</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -42,7 +42,13 @@
|
||||
},
|
||||
methods: {
|
||||
addCard() {
|
||||
this.cards.push(this.message)
|
||||
this.cards.push({
|
||||
id: new Date().getTime(),
|
||||
content: this.message,
|
||||
})
|
||||
},
|
||||
removeCard(i) {
|
||||
this.cards.splice(i, 1)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user