I\'m running into the problem, that Vue converts the value of an input field of type number into a string and I just can\'t figure out why. The guide I am following along do
Change the order object to :
const order = {
stockId: this.stock.id,
stockPrice: this.stock.price,
quantity: +this.quantity
};
This will automatically parse the string to a number.
In general the data from HTML inputs are strings. The input type only checks if a valid string has been provided in the field.
You need to use .number modifier for v-model, like this:
<input v-model.number="quantity" type="number">