javascript - I have been learning vue.js recently, and there is still a certain gap in my understanding of its parent and child components!
伊谢尔伦
伊谢尔伦 2017-05-24 11:36:46
0
3
688

I saw the api on the official website and this picture, but I don’t understand it very well. I feel that the components are similar to the custom instructions of angularjs..

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(3)
过去多啦不再A梦

The general meaning is that the child component and the parent component communicate with each other. The child component may call the parent component's method, but please do not let the child component depend on the parent component and cannot be used in other places

给我你的怀抱

The parent component passes data to the child component through props, changes the state of the child component, etc.
The child component passes the event to the parent component through events for further processing
Reduces the coupling between components.

迷茫

The biggest feeling that Vue’s components give me is that as long as you write it well, I will introduce the components that need to pass parameters into the page. Even if I don’t pass anything, the component will not report an error

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template