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

167
Visualizações
two nested v-for loops of which the inner one shouldn’t display its element but is needed for getting class attributes

how would we solve having two nested v-for loops (elements), of which one is solely for getting class attributes and shouldn't display its div element? because it is of course displaying its element in each iteration and causing a break in the layout and displaying duplicated data because of those iterations

DESIRED OUTCOME: I need to be able to use values from an array, for the column width of the rendered values of a loop, as interpolation in the class attribute along with their corresponding rendered values.

live example: https://stackblitz.com/edit/vitejs-vite-kkzp2g?file=src/components/HelloNestedLoop.vue

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Use a <template> tag instead of <div> for the outer element:

<template v-for="...">
  <div v-for="...">
  </div>
</template>
about 4 years ago · Juan Pablo Isaza 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