-1
I’m using v-money for prices, if in the database there is no 0 at the end as for example: 10.99, when searching the value and playing in the input, the value appears normally. Now if in the database the value is 10.00, in the input appears 0.10. The API returns the 10.00 without the comma and the zeros (10), ai the v-money understands as 0.10.
NOTE: I am using v-money as a directive.
How do I solve this problem?
<input class="form-control" id="produto-precoCusto" v-model="produto.precoCusto" v-money="money" v-model.lazy="produto.precoCusto"/>
data: function() {
return {
money: {
decimal: ",",
thousands: "",
precision: 2,
masked: false
},},}