Vue subassembly components pass the value to the parent

One event subcomponents (sendData) inside pass data through this. $ Emit ( 'event name', the value passed)
parent component sub-assemblies at local call, bound subassemblies self-defined event name (change- data) 
that defines the parent component where the value of the function body to achieve the function experience with default parameter, the parameter value is transferred subassembly

 

Guess you like

Origin www.cnblogs.com/skydragonli/p/11308075.html