- 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.
推薦閱讀
- 計算思維與算法入門
- Java入門經(jīng)典(第6版)
- Apache Spark 2.x Machine Learning Cookbook
- Instant Zepto.js
- Python Game Programming By Example
- 青少年美育趣味課堂:XMind思維導(dǎo)圖制作
- Responsive Web Design with HTML5 and CSS3
- Python高級機器學(xué)習(xí)
- Oracle Database 12c Security Cookbook
- Apache Mahout Clustering Designs
- Corona SDK Mobile Game Development:Beginner's Guide(Second Edition)
- Mastering Android Game Development
- Mockito Essentials
- Java7程序設(shè)計入門經(jīng)典
- Sails.js Essentials