Skip to content

Update description about .number modifier #1285

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

Merged
merged 2 commits into from
Nov 10, 2021

Conversation

zxuqian
Copy link

@zxuqian zxuqian commented Oct 21, 2021

Description of Problem

It seems Vue 3 can automatically convert a string value to a number from a number input, i.e. <input type="number"

Vue Source Code:

const castToNumber = number || (vnode.props && vnode.props.type === 'number');

The documentation about .number modifier does not reflect this.

Proposed Solution

I made some changes to the docs, to make it clearer about this situation.

Additional Information

No.

@NataliaTepluhina NataliaTepluhina merged commit 3c97d52 into vuejs:master Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants