I want to add multiple classes when the user clicks on an item. Currently, I have this code snippet:
<div :class="[ item === form.score ? 'text-black bg-white': '' ]"
@click="form.score = item"
v-for="item in 10">
{{ item }}
</div>
However, only the bg-white
class is being added. Is there a more efficient solution for this?