1
I have a menu and wanted to know if there is a way I make a condition of add a class depending on the child class.
For example:
<ul :class="{ 'open' : TemClasseNoFilho }">
<li v-for="item in list" :class="{ 'active' : $route.nome == item.rotaNome}">
<a>{{ item.nome}}</a>
</li>
</ul>
In this example, I would like to set the condition: "Enter class "Open" in "ul" if the "li" have the class "active"
Thank you!
just create on the date, and make it
true
orfalse
, Then go check, if it istrue
, it exists, if it isfalse
nay– Rafael Augusto
What do you mean, Rafael?
– Jackson