Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

348
Visualizações
How to manage an active class <v-tabs> in Vuetify

I have <v-tabs> this kind:

<v-tabs
            fixed-tabs
            centered
            align-with-title
            height="55"
            class="d-flex align-end justify-center mt-0"
        >
          <v-tabs-slider color="pink" v-show="(searchClosed && !search)"></v-tabs-slider>
          <v-tab :disabled="!searchClosed" :to="{ name : 'home' }">Home</v-tab>
          <v-tab :disabled="!searchClosed" :to="{ name : 'premiers' }">Premiers</v-tab>
          <v-menu offset-y bottom max-height="500" v-model="genresMenu">
            <template v-slot:activator="{ on, attrs }">
              <v-tab @click="genresMenu = !genresMenu" bind="attrs" v-on="on">Genres</v-tab>
            </template>
            <v-list
                nav
                rounded
                max-width="800"
                align="center"
            >
              <v-list-item
                  v-for="genre in genres"
                  :key="genre.id"
                  :to="{ name : 'genre', params: { id: genre.id }}"
              >
                <v-list-item-title>{{ genre.name }}</v-list-item-title>
              </v-list-item>
            </v-list>
          </v-menu>
        </v-tabs>

The active class switches between the Home / Premiers tab as needed, but when you click on the link on the Genre tab, the active class is updated and returned to the Home tab. Can I somehow keep the Genre tab active after following the link inside v-list-item? Example path: /genre/1

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Try this

<template v-slot:activator="{ on, attrs }">
  <v-tab >
    <div @click="genresMenu = !genresMenu" bind="attrs" v-on="on">Genre</div>
  </v-tab>
</template>
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda