Difference: Function Relationship data communication between components during assembly and register

Parent components pass data to the sub-assembly:

1 in the data, the parent component to pass through v-bind: attribute name = "attribute value" is bound to a label;

2, the subassembly components received from the parent attribute declaration by props.

Within parent components need to use the data function, it depends on the "attribute value" passed above.

E.g:

Herein is defined (registered), is transmitted to the assembly component-a name attribute components:

 And here the same:

 The above two examples, are registered at the time of assembly (as defined), the case of transmitting data to the component itself. Not related to a communication to the parent component subassembly.

The following right contain 2 sub-assembly components, namely right-top and right-bottom, since the sub-assembly 2 To transfer data, therefore, needs to function with data:

 

Guess you like

Origin www.cnblogs.com/JAVA-STUDYER/p/11595683.html