Vue the parent component subassembly to pass values

Sons components by value: parent component sub-assemblies at the local call, add a custom attribute, the value of the property is the data sub-assemblies to be passed to you, if the value is a variable, you need to use binding properties;

Subassembly defined place, add a props option, attribute name element value is an array, the array is defined when calling the parent component sub-assemblies, sub-assemblies so that you can attribute name by self-defined access directly to the parent component data transfer from the

 

Guess you like

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