vue---父子组件之间的通讯【props,$refs、$emit】

在用vue进行项目开发的时候,父子组件之间的通讯是常常被用到的,下面就来具体说说父子组件通讯的三种方式:vue

父组件:spa

<template>
 <div>
 <h1>我是父组件!</h1>
 <child></child>
 </div>
</template>
 
<script>
import Child from '../components/child.vue'
export default {
 components: {Child},
}
</script>

具体参考:https://www.jb51.net/article/140581.htm.net

相关文章
相关标签/搜索