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

83
Views
Totalización de valores por ID de div en vue

Estoy usando Vue en una página web y me gustaría que el valor de los datos de una tabla sea un total acumulado de valores que se imprimieron en un cierto div en mi tabla

Espero evitar el cálculo o cualquier manipulación de los datos en sí, pero me gustaría tomar los valores que se han impreso en el div con los totals de identificación y simplemente sumarlos para un gran total donde está mi comentario.

¿Puedo acumular valores basados en div id en vue como este?

Mi código:

 <tr v-for="(value, warehouse) in numbersByWarehouse" :key="warehouse"> <td>@{{warehouse}}</td> <td v-for="date in dates" :key="date" > <div v-for="(dataByDate, dateValue) in value.dates" :key="dateValue"> <div id="totals" v-if="dateValue == date "> @{{dataByDate.total_categories}} </div> </div> </td> <td> <!-- I want this to be a total of all values for @{{dataByDate.total_categories }} in div ID totals --> </td> </tr> //here's the returned object for reference numbersByWarehouse() { warehouseRows = [ { "13401 - TEST ":{ "dates":{ "2021-11-11":{ "categories":420, "qty":1, "total_categories":420, } }, }, ] console.log(warehouseRows) return warehouseRows },
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!