![]() ![]() Method 1: Assign the Prop to a local variable, and then modify this local variable if you need to modify it instead of affecting PROP If you have to modify these data, you can use the following methods: But in the sub -component, we don't want to modify the PROP. When the Name of the parent component changes, the sub -component will automatically update the view.Then the page will be rendered: Hello Linxin One -way data stream.// register a parent component vue.component 'Father', / /span /template.The parent -child relationship is that component A uses component B in its template, then component A is the parent component, and the component B is the sub -component. ![]() Father and son relationship and brotherhood (not the father and son are temporarily called brothers). There are still different relationships between the components and components. ![]() Essence How to pass data has also become one of the important knowledge points of components. The component is one of the large features of Vue.js ***, and the scope of the component instance is independent of each other, which means that the data between different components cannot be referenced with each other. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |