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

521
Views
Vue.js: "TypeError: no se pueden leer las propiedades de undefined (leyendo '$ refs)'"

Estamos activando métodos desde un componente principal en un componente secundario de esta manera:

 await this.$refs.patientinputmask.$refs.patientpersonaldata.ChangePersonalData(); await this.$refs.patientinputmask.$refs.patientaddressdata.SavePersonalAddressObject(); await this.$refs.patientinputmask.$refs.patientbankaccountdata.SavePersonalBankAccountObject(); await this.$refs.patientinputmask.$refs.patientrelatedcontacts.SaveRelatedContactObject(); if (this.invoiceHN == true) { await this.$refs.patientinputmask.$refs.invoicedata.$refs.invoiceHN.$refs.invoiceKasseHeaderHN.SavePatientDataForInvoice(); await this.$refs.patientinputmask.$refs.invoicedata.$refs.invoiceHN.$refs.invoicingTemplateHN.SavePatientTemplateConfigDTO(); }

De vez en cuando ocurre un error: [Vue warn]: Error en von handler (Promises/async): "TypeError: Cannot read properties of undefined (reading '$refs')", lo que hace que toda la cascada de llamadas a funciones colapse y ninguno de estos métodos se activa. Los métodos y los datos se encuentran en los componentes secundarios. ¿Qué problema puede causar ese comportamiento?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Parece que algunos de los componentes secundarios no están completamente montados cuando ejecuta su código. ¿Cuándo está ejecutando este código en el elemento principal?

Puede activar un evento de cada uno de los componentes secundarios al montar, luego ejecutar su código después de que todos hayan sido montados.

 <child-component @hook:mounted="doSomething" />

(Ejemplo encontrado aquí: Vue JS 2.0 Child Component Mounted Callback )

about 4 years ago · Juan Pablo Isaza Report
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!