-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v-model.number modifier doesn't work on custom component #2326
Comments
you can get the value of a bad example: app.component('custom-input', {
props: ["modelValue", "modelModifiers"],
template: `<input :value="modelValue" @input="$emit('update:modelValue', modelModifiers.number ? Number($event.target.value) : $event.target.value)"/>
`
}) |
This should be related to #1825 |
This does work, however this is more like a workaround I hope? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version
3.0.0
Reproduction link
https://codepen.io/gilian1993/pen/XWKWjZY?editors=1111
Steps to reproduce
1: Open codepen link
2: Add a number to the fisrt input and the type "number" will display. This is a normal input.
3. Add a number to the second input and the type "string" will display. This is a custom input.
What is expected?
The custom input should return a number.
What is actually happening?
It returns a string.
The text was updated successfully, but these errors were encountered: