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

121
Visualizações
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 à 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