Parent Calling Child Component Methods with Arguments
# Parent Calling Child Component Methods with Arguments
Call methods on the child component and pass arguments via ref references.
Parent component:
<ChildComponentTag ref="refName"></ChildComponentTag>
methods: {
fnX(x) {
this.$refs.refName.fnY(x) // call child component method and pass value
}
}
1
2
3
4
5
6
7
2
3
4
5
6
7
Child component:
methods: {
fnY(x) {
this.x = x
}
}
}
1
2
3
4
5
6
2
3
4
5
6
Edit (opens new window)
Last Updated: 2026/03/21, 12:14:36