react+ant-deign开发笔记 卡卡_罗特 2021-08-12 131 阅读1分钟 1.父组件调用子组件方法 父组件 <NoticeRightView BusinessScene={this.state.BusinessScene} onRef={(ref) => {this.child = ref}} > </NoticeRightView> this.child.getMsgRightItem() 子组件 componentDidMount() { this.props.onRef(this) }