Answer the question
In order to leave comments, you need to log in
Vue, applying styles to one of several identical elements?
<div v-for="(Etask) in Etasks" :key="Etask.id" class="card-action">
<div class="card ">
<div v-bind:class="classcomplite" class="card-content">
<div class="row">
<div class="col s11 m11 l11">
<p><h6 v-bind:class="classtext">Name Task: {{ Etask.title }}</h6></p>
</div>
<div class="col s1 m1 l1">
<a href="#" v-bind:class="classcomplite" class="btn-floating red" v-on:click="taskcomplite(Etask.id)"><i class="material-icons">done</i></a>
</div>
</div>
</div>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Get the style through the method to which you will pass the Id by which to determine which style to return. Well, or directly in the attribute write
<div v-bind:class="{ 'класс_для_определенного': id === 10, 'класс_для_всех': true }></div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question