//Father组件
<template>
<Children :remoteMethod="remoteMethod" />
</template>
<script>
export default{
methods: {
remoteMethod() {
//想让这里this指向Father,而不是指向Children
console.log(this)
}
}
}
</script>
//Children组件
<script>
export default{
props: {
remoteMethod: {
type: Function
}
}
}
</script>
麻烦点的话,传入个父方法,然后父方法里面有进行逻辑判断