VueJS Class Condition

0

I have a menu and wanted to know if I have a condition to 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'd like to put the condition: "Insert class" Open "into" ul "if" li "has class " active "

Thank you!

    
asked by anonymous 25.09.2017 / 15:11

0 answers