[Vuejs]-Update html dashboard cards through Vue js

1👍

I see a few potential issues that could be the cause of the problem:

  1. As Sphinx notes, there’s a typo in the <p> tag.
  2. You have totalsSales in data but totalSales in the v-for.
  3. You declare data twice.
  4. If you are using components: "When defining a component, data must be declared as a function that returns the initial data object" (docs)
  5. It isn’t clear from the code you posted how totalSales is supposed to be populated. Is refreshData doing it? Unless you have an interceptor set up that you didn’t post, getTotalSalesToday isn’t updating totalSales. You’d need a .then that uses the response from the server to set totalSales.

Leave a comment