This commit is contained in:
sschum 2023-07-13 15:07:40 +02:00
parent 03f43618ff
commit 4ee9969860
2 changed files with 6 additions and 2 deletions

View File

@ -26,7 +26,9 @@
<div class="row">
<div class="col-6" v-for="(card, i) of cards" :key="card.id">
<card :css-class="i % 2 === 0 ? 'bg-primary' : 'bg-secondary'"></card>
<card :css-class="i % 2 === 0 ? 'bg-primary' : 'bg-secondary'">
{{ card.content }} ({{ card.id }})
</card>
</div>
</div>
</div>

View File

@ -4,7 +4,9 @@ MyVueApp.component('card', {
<div class="card">
<div :class="cssClass">
<div class="card-body">
<h5 class="card-title"></h5>
<h5 class="card-title">
<slot></slot>
</h5>
</div>
</div>
</div>