Vue communication between the parent component and subassembly

A parent component subassembly to pass the value
1. call parent component subassembly
Import ArchivesTable from "./components/ArchivesTableComponent.vue";
2. Register within parent components subassembly
Components: ArchivesTable {},
3. parent component the bind-V
Here Insert Picture Description
4. subassembly accept the value passed to the parent element
Here Insert Picture Description
5. the subassembly can use the value of the parent element

Second, the method of the parent component invokes subassembly
1. $ refs within parent components
Here Insert Picture Description
calling method subassembly
Here Insert Picture Description
subassembly Method
Here Insert Picture Description

Third, call the parent sub-assembly and assembly method by value
1. In response to the event $ EMIT

the this. $ EMIT ( "SelectRow", Val)
Here Insert Picture Description
2. v-on the monitor with the parent component
Here Insert Picture Description

Published 18 original articles · won praise 5 · Views 6730

Guess you like

Origin blog.csdn.net/qq_28687183/article/details/83145002