先准备子组件页面 准备父组件页面并引用子组件 父子组件传值 1.props/ e m i t 2. emit 2. emit2.parent/chifdren 3.$ref 1.props/$emit方法演示 props 父传子 emit 子传父 父组件用@监听自定义事件 2.$parent/chifdren方法演示 原理通过this.$parent/chifdren获取父/子里面data的值 拿来主义 附加功能也可以通过这个方法去直接触发要通信组件的方法 3.$ref 同$parent/chifdren类似