Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

185
Vistas
Delete blank rows from table
<tr v-for="(value, key) in this.object" :key="key">
  <div v-if="value.item1 != null">
    <td width="400" class="alnleft">{{value.item1}}</td>
    <td width="50" class="alnright">{{value.item2}}</td>
  </div>
</tr>

With the v-if I am omitting values to print in tr. But above code printing black tr and unnecessary space is getting created . Please suggest how to get rid of this

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You dont ever want to place a div as the child of a tr. You can prevent the div from being inserted by replacing it with template.

<tr v-for="(value, key) in this.object" :key="key">
    <template v-if="value.item1 != null">
        <td width="400" class="alnleft">{{value.item1}}</td>
        <td width="50" class="alnright">{{value.item2}}</td>
    </template>
</tr>

Does that fix your issue?

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda