父组件:
<template>
<div>
<CustomTree ref="customTree" />
<button @click="handleClick">调用 getNode 方法</button>
</div>
</template>
子组件CustomTree :
<template>
<div>
<el-tree ref="treeRef"></el-tree>
</div>
</template>
如何在父组件调用el-tree中的getNode方法?
可以在子组件中使用defineExpose把treeRef暴露出去