在子组件中
this.customfunction = this.customfunction.bind(this);
即可
react父组件通过ref获取不到子组件方法的解决方案
最新推荐文章于 2023-12-26 10:28:51 发布
在子组件中
this.customfunction = this.customfunction.bind(this);
即可