摘要: 父组件: <Child onRef={(ref) => { this.child = ref; }} /> 用的时候直接从this.child里面取 子组件: componentDidMount() { this.props.onRef(this); } 阅读全文
posted @ 2019-12-10 17:22 浪浪浪浪浪浪浪浪 阅读(7193) 评论(3) 推荐(0) 编辑