在父组件中引用,注册,使用子组件。然后在子组件上打上标签ref
<sideCatalogue ref="sideCatalogue" :getChildName="getChildName"></sideCatalogue>
在父组件的事件中可以获取子组件中的方法和数据,show()为子组件的方法,想获取子组件的数据同理
// 服务目录弹窗打开
serviceClick() {
this.$refs['sideCatalogue'].show()
},