- 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.
推薦閱讀
- Magento 2 Theme Design(Second Edition)
- HTML5 移動Web開發從入門到精通(微課精編版)
- MongoDB for Java Developers
- Mastering Ubuntu Server
- Raspberry Pi 2 Server Essentials
- EPLAN實戰設計
- TradeStation交易應用實踐:量化方法構建贏家策略(原書第2版)
- Learning Zurb Foundation
- Terraform:多云、混合云環境下實現基礎設施即代碼(第2版)
- Hands-On Kubernetes on Windows
- Oracle實用教程
- Sails.js Essentials
- Python面試通關寶典
- Python高性能編程(第2版)
- Learning iOS Penetration Testing