Vuejs2 Vue js子组件和父组件

Vuejs2 Vue js子组件和父组件,vuejs2,vue-component,Vuejs2,Vue Component,如何理解子组件和父组件?孩子或父母在哪里?在文档中,我没有发现这种描述。请帮忙 在下面的示例中,我只看到一个没有父级或子级的组件。只有一个。这是“我的组件”。等待答案。谢谢 Vue.component("my-component", { template: `<li> Hello </li>` }) new Vue({ el: "#app" }) <div id="app"> <my-component> </my

如何理解子组件和父组件?孩子或父母在哪里?在文档中,我没有发现这种描述。请帮忙

在下面的示例中,我只看到一个没有父级或子级的组件。只有一个。这是“我的组件”。等待答案。谢谢

Vue.component("my-component", {
    template: `<li> Hello </li>`
})

new Vue({
    el: "#app"
})

<div id="app">
    <my-component> </my-component>
</div>
Vue.component(“我的组件”{
模板:`
  • 你好
  • ` }) 新Vue({ el:“应用程序” })
    Vue-#应用程序是父组件,组件-我的组件是子组件。 里面的组件是一个子组件,它非常明显的

    Vue-#app是父组件,而组件-我的组件是子组件。 里面的组件是一个孩子,很明显