摘要: 子组件要调用父组件的方法: 父组件传入子组件要调的方法 <Child fun={this.fun.bind(this)}> 子组件可通过props直接调用 this.props.fun(xx) 父组件要调用子组件的方法: 父组件中给子组件设置onRef事件,并设置调用名=ref <Child onR 阅读全文
posted @ 2020-09-12 13:59 herry菌 阅读(218) 评论(0) 推荐(0) 编辑