0👍
Calling toFixed()
in your setCosts
method returns a string. So you are adding two strings, which results in a concatenated string.
If you want item.cost
as a numeric value, you can use the unary plus like this:
item.cost = +((d + c).toFixed(2));
- [Vuejs]-Laravel VueJS – Cannot find element: #navigation
- [Vuejs]-How to avoid component rerendering when route change which similar to keep-alive in vuejs?
Source:stackexchange.com