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

140
Views
¿Por qué empujar un elemento a una matriz de datos no actualiza las herramientas de desarrollo view/vuejs con los nuevos datos?

Por alguna razón, insertar datos en una matriz no actualiza los datos de las herramientas de desarrollo view/vue. ¿Por qué?

He limpiado la memoria caché del navegador sin suerte.

 theArray = [ [ { test: true } ] ] methods: { addNewItem() { console.log(this.theArray[0].length); // = 1 this.theArray[0].push({}); console.log(this.theArray[0].length); // = 2. This does however show that the data was pushed but why do the view and vuejs tools not update/show the pushed data? } }

Sin embargo, hacer esto funciona por alguna razón?

 this.theArray.push({});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Eso se debe a la reactividad de Vue. Puede usar Vue.set() / this.$set() .

 this.$set(theArray, 0, [ ...theArray[0], {} ]);

https://vuejs.org/v2/guide/reactive.html#For-Arrays

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!