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

153
Visualizações
Display html element after v-for loop was finished

I have object with elements and I use v-for loop to dispaly them on page:

    <template v-for="(item, index) in myObject">
      <v-row :key="index">
          <v-col>
            <v-text-field
              v-model="item.value"
              :label="item.name"
            />
          </v-col>
        </v-row>
    </template>
 
    <!-- additional TextField -->
    <v-row>
      <v-col>
        <v-text-field
          v-model="modifyDateTime"
          label="Modify date and time"
        />
      </v-col>
    </v-row>

It works fine, but I added additional v-text-field below after v-for block and it shows up earlier than elements in v-for loop rendered.

How can I solve this problem? I need to display the last v-text-field element right after elements v-for loop was rendered

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

0

use v-if in loop

<template v-for="(item, index) in myObject">
          <v-row :key="index">
              <v-col>
                <v-text-field
                  v-model="item.value"
                  :label="item.name"
                />
              </v-col>
            </v-row>
            <!-- additional TextField -->

                <v-row v-if="index == Object.keys(item).length - 1">
                  <v-col>
                    <v-text-field
                      v-model="modifyDateTime"
                      label="Modify date and time"
                    />
                  </v-col>
                </v-row>
        </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