Sons transfer between components Vue

A parent are passed to the component sub-assembly
1, to form a parent-child relationship assembly

2, defined in the sub-assembly props and two variables cmessage cbooks (props array type)

3, component binding using two variables with v-bind and cmessage cbooks, the value of books and message
integrity code is as follows:

the following is added some modification of code:

Second, to the parent component subassemblies pass
1, to form a parent-child relationship assembly
2, defined in a subassembly event
3, the custom event receiving film plate

Guess you like

Origin www.cnblogs.com/doumian/p/12114511.html