导语:
习惯了父子组件传参,今天聊一聊router-view传参。其实本质也是父子组件传参,方法一模一样,之前也提过,但说的不是很好懂,这里简洁明的细谈一番。
一、从 router-view 中往父组件传值
父组件中:

子组件中:

父组件查看传值情况:

习惯了父子组件传参,今天聊一聊router-view传参。其实本质也是父子组件传参,方法一模一样,之前也提过,但说的不是很好懂,这里简洁明的细谈一番。
父组件中:
子组件中:
父组件查看传值情况:
本文标题:router-view 父子传参
本文链接:https://www.haomeiwen.com/subject/wvxpkhtx.html
网友评论