Skip to content

Commit 1f0490f

Browse files
author
Ben
authored
Change emit example function name for clarity (vuejs#2050)
* Change emit example function name for clarity Hello, I suggest changing the function name in the "component instance" example from `submit` to `someEvent` (and also possibly adding some extra HTML example code for added clarity) As-is, I did not immediately see the connection between "submit" and the following code, which references "some-event" I'm just learning Vue and was a little confused by this section in the docs. It's very possible I'm still confused, in which case, please disregard :) * Remove template snippet
1 parent ee97545 commit 1f0490f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guide/components/events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The `$emit()` method is also available on the component instance as `this.$emit(
2323
export default {
2424
methods: {
2525
submit() {
26-
this.$emit('submit')
26+
this.$emit('someEvent')
2727
}
2828
}
2929
}

0 commit comments

Comments
 (0)