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

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.

主站蜘蛛池模板: 和田市| 扶风县| 武清区| 黔江区| 巫山县| 佛冈县| 资溪县| 社旗县| 临沭县| 靖宇县| 溧阳市| 雷波县| 铜山县| 石河子市| 黄龙县| 扬州市| 辽源市| 那曲县| 郑州市| 潼关县| 新闻| 三门县| 邵东县| 历史| 吐鲁番市| 连南| 东乌珠穆沁旗| 凌源市| 贺州市| 论坛| 贵定县| 清河县| 长宁区| 友谊县| 明水县| 昭平县| 浦江县| 临安市| 恭城| 防城港市| 商丘市|