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

268
Vistas
Deleting a Vue component dynamically

I am trying to render certain components which are present in an array using component tag of Vue js.

<div v-for="(arr, index) in compArray">
    <component v-bind:is="arr.name" :key="arr.name+index" :index="index"></component>
</div>

data() {
  compArray: [{name: "Abc"}, {name: "Xyz"}]
}

I am able to add new elements to this compArray and which will increase the components that are rendered. But when i am deleting, there is an issue with UI (data). Like, if there are 3 components and all three are having data property count.

Suppose for first element rendered this count is 4, for second it is 5 and for third it is 2. Then if i delete the second element from the compArray using slice method, data shown is still 5. In ideal case it should be 2, since middle one has been deleted.

What can be the issue behind this? Any help is appreciated

about 4 years ago · Juan Pablo Isaza
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