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

127
Vistas
Vue3 component with 'is router link' ref returns a proxy instead of an object

I'm kinda new with vue so I'm trying to use the good practices, but I have a quick question:

I'm using a component object with a ternary making it either a section or a router-link, and this component object has a ref I need to do some stuff with it.

In the case the component is a section, ref will return the object and I will be able to do my stuff, but in the case it's a router-link the ref returns a Proxy.

How can I get the same object that I get when it's section when I get Proxy returned?

EDIT:

Template:

<template>
    <component :is="(isLink)?'router-link':'section'" :to="(isLink != null)?link:''" ref="pop_target">
</template>

in mounted:

contentPop(this.$refs.pop_target, true) // First arg is an html object
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