The props used when defining sub-components can support parent components to pass data to sub-components. These defined props can be bound to the tags of sub-components, but if you are using a
<div class="app" id="deviceready"> <component :is="currentView" :user_name.sync="user_name" :DOB.sync="DOB"></component> </div>
The role of the component is independent
The function of the component is independent. If you want to get data from the component, you need to pass it layer by layer. That is to say, the child component can only get the data from the direct parent component. If it is the data of the root component, Then the parent component will continue to expose pops to bind data from the root component.
The above is a detailed explanation of the method of passing data from vuejs dynamic components to sub-components introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message. Editor Will reply to everyone promptly. I would also like to thank you all for your support of the PHP Chinese website!
For more detailed explanations of how vuejs dynamic components pass data to subcomponents, please pay attention to the PHP Chinese website for related articles!