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

131
Vistas
Vuejs 3 append dynamic component to dom with jquery

I am trying to pass a dynamic component (ChildA) to another component (ChildB) and then append the ChildA component to the dom from ChildB via jquery.. Is there any way to make this work? I know this is not not the best solution but the real case is much more complicated and i think the easiest way would be if i got this to work.

Parent

<template>
  <ChildB :component="component" />
</template>
import ChildA from './ChildA.vue';
<script>
export default {
  data() {
    return { component: ChildA } 
  };
</script>

ChildA

<template>
  <div>
    <h3>I am Child A</h3>
  </div>
</template>

<script>
export default {}
</script>

ChildB

<template>
  <div>
    <div id="child"></div>
  </div>
</template>

<script>
export default {
  props: ['component'],
  mounted() {
  $('#child').append(this.component);
  }
}
</script>
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