I was building a step form and i would like to perform validation and fetch data from my child component.
So i have a step form which ive separated into container(parent) and step1(child)
THe child has form data
IN the child i have
<template>
thre is the form fiedls
</template>
<script>
data:()=>({
orderform:{
first_name:'',
lastname:''
}
}),
methods:{
submitOrder(){
this.$validator.validateAll()
.then(
(res)=>{
if(res){
//pass this.orderform to parent component
}
}
)
}
}
Now in the parent
<script>
methods:{
gotonextStep(){
//here execute submitOrder function in the child mcomponent
//am stuck
//also retrieve order form data here.
}
}
</script>
How do i execute the function in the child component and retrieve data fom the parent component.
UPDATE ON PARENT STRUCTURE
<stepper>
<v-stepper-content step="1">
<child-1></child-1>
<button @click.native="gotonextStep">Continue</v-btn>
</v-stepper-content>
...other stepper steps
</stepper>