Props when defining child components can support the parent component to pass data to child components. These defined props can use binding attributes in the label of child components. However, if you use the dynamic component of <component>, there is no explicit subcomponent tag at this time. To pass data to child components, you need to bind in <component>
<div id="deviceready"><component :is="currentView" :user_name.sync="user_name" :DOB.sync="DOB"></component></div>
The function of components is independent
The function of the component is independent. If you want to obtain data from the component, you need to pass it layer by layer. That is to say, the child component can only obtain data from the direct parent component. If it is the data of the root component, the parent component will continue to expose pops to bind the data from the root component.
The above is a detailed explanation of the method of passing data to subcomponents by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support to Wulin.com website!