Ten Ways Sons component in communication between Vue.js

In fact, several communication VUE is nothing less than the following:
1.Prop (common)
2. $ EMIT (component package is used more)
3.sync syntactic sugar (less)
4. $ and $ attrs the Listeners (Component the more encapsulation)
5.provide and Inject (high order component / component library is used more)
6. other communicably

Personal feeling on top of several components are not very familiar with this sort is no longer so first, go put a few components all over again combing write feeling

Published 53 original articles · won praise 33 · views 110 000 +

Guess you like

Origin blog.csdn.net/weixin_42966484/article/details/86600461