vuejs / vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
http://v2.vuejs.org
MIT License
207.97k stars 33.68k forks source link

Variable is defined as number but on event v-model changes to string #9360

Closed k4rz4 closed 5 years ago

k4rz4 commented 5 years ago

Version

2.5.17

Reproduction link

https://jsfiddle.net/48r5zeLy/2/

Steps to reproduce

v-model on input field converts variable from number to string.

What is expected?

For instance i want to send some data to api and i have declared type of item in object as 'Number', should stay as number

What is actually happening?

Var type is converted to 'String'

posva commented 5 years ago

Use the .number modifier on v-model


Remember you can use the forum or the Discord chat to ask quick questions!

k4rz4 commented 5 years ago

Great! Thanks