- Vue.js 2.x by Example
- Mike Street
- 113字
- 2021-07-02 20:00:32
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.
推薦閱讀
- ServiceNow Application Development
- Apache ZooKeeper Essentials
- JIRA 7 Administration Cookbook(Second Edition)
- 前端架構:從入門到微前端
- TradeStation交易應用實踐:量化方法構建贏家策略(原書第2版)
- Learning Probabilistic Graphical Models in R
- 微服務架構深度解析:原理、實踐與進階
- Machine Learning in Java
- Python從入門到精通
- Geospatial Development By Example with Python
- Java7程序設計入門經典
- Mastering ASP.NET Core 2.0
- 優化驅動的設計方法
- 基于JavaScript的WebGIS開發
- Three.js Essentials