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

72
Views
Vue 3 cambiar objeto reactivo

Tengo algunas dificultades para cambiar el objeto reactivo en Vue 3. Por ahora, mi aplicación funciona así:

 let selected = ref({ label: items[0].label, icon: items[0].icon, class: items[0].class, component: items[0].component });

como puede ver, no estoy usando reactivo aquí, el reactivo debería verse así: let selected = reactive(items[0]);

y cuando estoy cambiando ref, funciona así:

 function select(value : any) { //Record<string, any> ) { selected.value = value; emit('update:modelValue', value); }

Y eso funciona como se esperaba, pero cuando cambio a un objeto reactivo, elimino el valor de la selección de función y no cambia el objeto. ¿Cómo arreglar eso?

por cierto: estoy usando TypeScript

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!