How to Convert String into Integer using Vuejs, vuex?

Viewed 13964

I have a Little Problem with my application. I am currently making a Basic stock Trader app (as an exercise). I am using Vuejs and Vuex. In my store.js file I am storing all the global variables but there is this problem with the bmw_quantity data. It is mapped to a v-model (Input field) which you can see in the stocks.vue component. For some reasons the data is always a string. I don't know why and I also tried several things but I couldn't convert the things I type in the field into an actual integer and not a string.

Here is my code:

image 1

image 2

1 Answers
Related