Skip to content
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

Doc for update:modelValue or update:* event ? #2810

Closed
steelywing opened this issue Apr 19, 2024 · 4 comments
Closed

Doc for update:modelValue or update:* event ? #2810

steelywing opened this issue Apr 19, 2024 · 4 comments

Comments

@steelywing
Copy link

https://vuejs.org/guide/components/v-model.html#under-the-hood

defineModel will convert to an event named update:modelValue, I search the doc site but I cannot found doc for update:modelValue or update:* event, how the parent handle this event?

I think it will make the parent update the modelValue to the emit value, right?

@brc-dd
Copy link
Member

brc-dd commented Apr 19, 2024

v-model="foo" is compiled to :modelValue="foo" @update:modelValue="$event => (foo = $event)"

@steelywing
Copy link
Author

v-model="foo" is compiled to :modelValue="foo" @update:modelValue="$event => (foo = $event)"

Thanks for the quick reply, can we have a doc for this?

@brc-dd
Copy link
Member

brc-dd commented Apr 19, 2024

IIRC it used to be there but I can't find it anymore.

@NataliaTepluhina
Copy link
Member

Closing as related PR was merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants