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

父组件:

<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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-07
  • 2021-04-10
  • 2021-05-03
相关资源
相似解决方案