You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under Vue 2.x, I found that I should use 'Modifiers' when I wanna input a number and get a v-model value. But in Vue 3.x, it is automatically convert the input number type to [number] but [string] without Modifiers. So I doubt there are some reasons for it, what are they?
What does the proposed API look like?
<input type="number" v-model="count">
when input something, count will be type [number] always but [string]
The text was updated successfully, but these errors were encountered:
IIRC, after being discussed in an issue in Vuejs/core, it just made more sense. However, changing it in v2 would potentially break a lot of people’s code relying on this behavior
Is there anyway to remove that auto casting? If we want to get as numeric value we can always use v-model.number but if we want to get the string value, now there's no way.
Why would we want a string value with input type number?
I want the leading zeros.
Display appropriate inputs. (I can use inputmode but input type number is the only way to show a keyboard with enter(return) key on mobile safari)
What problem does this feature solve?
Under Vue 2.x, I found that I should use 'Modifiers' when I wanna input a number and get a v-model value. But in Vue 3.x, it is automatically convert the input number type to [number] but [string] without Modifiers. So I doubt there are some reasons for it, what are they?
What does the proposed API look like?
<input type="number" v-model="count">
when input something, count will be type [number] always but [string]
The text was updated successfully, but these errors were encountered: