1👍
I see a few potential issues that could be the cause of the problem:
- As Sphinx notes, there’s a typo in the
<p>
tag. - You have
totalsSales
indata
buttotalSales
in thev-for
. - You declare
data
twice. - If you are using components: "When defining a component, data must be declared as a function that returns the initial data object" (docs)
- It isn’t clear from the code you posted how
totalSales
is supposed to be populated. IsrefreshData
doing it? Unless you have an interceptor set up that you didn’t post,getTotalSalesToday
isn’t updatingtotalSales
. You’d need a.then
that uses the response from the server to settotalSales
.
Source:stackexchange.com