Skip to content
Advertisement

Tag: vuejs3

How to toggle colors in list in Vue?

I have a tree-view component: my not working script: I just want to toggle the item’s color, which I choosed, that is when I click an item(im my code this item has @click event) I want to this item change its color to another, but its huge problem to me to turn back previous item to initial color. Ive struggled

Vuejs : how to bind class within a v-for loop

In Vuejs3, I’m looping over an array of objects : I want to add the class ‘border-b-2’ only to the line selected line, but I don’t see how to do that dynamically. When I now set isSelected to true in the vue devtools, all lines get that style applied. As a workaround, what I now do is wrapping this code

Advertisement