父组件通过ref 模板引用方式调用报错如下 Uncaught TypeError: Cannot read properties of undefined (reading 'requestData')
父组件 const tableComponent: any = ref(null); 子组件代码 defineExpose({ requestData, });
发现methods写在steup外面引起的
模板对象打印有所变化
this.tableComponent.value.requestData 改为this.tableComponent.requestData 解决问题