Skip to content

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