text: (window.webpackJsonp=window.webpackJsonp||[]).push([[76],{186:function(t,a,r){"use strict";r.r(a);var e=r(0),_=Object(e.a)({},function(){this.$createElement;this._self._c;return this._m(0)},[function(){var t=this,a=t.$createElement,r=t._self._c||a;return r("div",{staticClass:"content"},[r("h1",{attrs:{id:"组件通信"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#组件通信","aria-hidden":"true"}},[t._v("#")]),t._v(" 组件通信")]),t._v(" "),r("h4",{attrs:{id:"需要组件之进行通信的几种情况"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#需要组件之进行通信的几种情况","aria-hidden":"true"}},[t._v("#")]),t._v(" 需要组件之进行通信的几种情况")]),t._v(" "),r("ul",[r("li",[t._v("父组件向子组件通信")]),t._v(" "),r("li",[t._v("子组件向父组件通信")]),t._v(" "),r("li",[t._v("跨级组件通信")]),t._v(" "),r("li",[t._v("没有嵌套关系组件之间的通信")])]),t._v(" "),r("h5",{attrs:{id:"_1、父组件向子组件通信"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_1、父组件向子组件通信","aria-hidden":"true"}},[t._v("#")]),t._v(" 1、父组件向子组件通信")]),t._v(" "),r("ul",[r("li",[t._v("通过props")])]),t._v(" "),r("h5",{attrs:{id:"_2、子组件向父组件通信"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_2、子组件向父组件通信","aria-hidden":"true"}},[t._v("#")]),t._v(" 2、子组件向父组件通信")]),t._v(" "),r("ul",[r("li",[t._v("利用回调函数")]),t._v(" "),r("li",[t._v("利用自定义事件机制")])]),t._v(" "),r("h5",{attrs:{id:"_3、-跨级组件通信"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_3、-跨级组件通信","aria-hidden":"true"}},[t._v("#")]),t._v(" 3、 跨级组件通信")]),t._v(" "),r("ul",[r("li",[t._v("层层组件传递props")]),t._v(" "),r("li",[t._v("使用context")])]),t._v(" "),r("h5",{attrs:{id:"_4、没有嵌套关系组件之间的通信"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#_4、没有嵌套关系组件之间的通信","aria-hidden":"true"}},[t._v("#")]),t._v(" 4、没有嵌套关系组件之间的通信")]),t._v(" "),r("ul",[r("li",[t._v("使用自定义事件机制")])])])}],!1,null,null,null);a.default=_.exports}}]);