Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

123
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!