$emit

用以触发父组件的自定义事件

 子组件中:

methods:{
select(type){
this.$emit('select',type)
}
}

父组件中:
绑定自定义事件
<zicujian @select='selectRating'> <zidinyi/>

selectRating(type){
this.selectType = type
}
原文地址:https://www.cnblogs.com/huhanqing/p/10087989.html