Skip to content

Update events.md #2941

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/v2/guide/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,12 @@ To address this problem, Vue provides **event modifiers** for `v-on`. Recall tha
- `.passive`

``` html
Please note that with the exception of `.once` the modifiers above only work with **native events**.

<p class="tip">
When emitting native-looking events from components, such as 'click', it is a good practice to also emit the native event. eg. `event.data = {...}; this.$emit('click', event)`. If you haven't read about components yet, don't worry about this for now.
</p>

<!-- the click event's propagation will be stopped -->
<a v-on:click.stop="doThis"></a>

Expand Down