子组件获取父组件的方法
代码
<template>
<div class="son">
<div class="son_box" @click="getFather">This is son</div>
</div>
</template>
<script>
export default {
name: "",
data() {
return {};
},
methods: {
getFather(){
this.$parent.getSon()
}
},
};
</script>