官术网_书友最值得收藏!

Making the filters a component

We now need to make the filtering section its own component. This isn't strictly necessary in this scenario, but it's good practice and gives us more challenges.

The problem we face in making the filtering a component is a challenge of transferring filter data between the filtering component and the team-member component. Vue addresses this with custom events. These let you pass (or "emit") data to the parent or other components from the child component.

We are going to create a filtering component which, on filtering change, passes the data back to the parent Vue instance. This data is already passed through to the team-member component to filter.

主站蜘蛛池模板: 永定县| 牟定县| 登封市| 白水县| 榆树市| 新泰市| 尚义县| 丰原市| 盘锦市| 莫力| 腾冲县| 南华县| 宣恩县| 缙云县| 永嘉县| 苏尼特右旗| 体育| 方山县| 巴东县| 寻乌县| 无极县| 民勤县| 济南市| 江津市| 卓资县| 逊克县| 玉林市| 马尔康县| 马公市| 长阳| 高邑县| 新源县| 公安县| 靖边县| 清河县| 离岛区| 长阳| 巍山| 乐亭县| 正宁县| 峨山|