Child Component Emitting Events and Values to Parent
# Child Component Emitting Events and Values to Parent
The child component emits events and values to the parent using $emit (multiple values can be passed):
this.$emit('fnX', value)
1
The parent component listens to the event emitted by the child component using v-on, and triggers a new event that can receive the passed values:
<ComponentName @fnX="fnY"></ComponentName>
methods: {
fnY(value) {
console.log(value)
}
}
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# Parent-Child Data Passing Demo
Edit (opens new window)
Last Updated: 2026/03/21, 12:14:36