父组件:
hanleShow=(equment)=>{
console.log("equment子组件传来的值");
}
<D3 showHide={(e)=>this.hanleShow(e)} />
子组件:
//params子组件的要给父组件传的值或者方法
this.props.showHide(params);
搞定,父组件就可以去到来自子组件的方法(数据)
父组件:
hanleShow=(equment)=>{
console.log("equment子组件传来的值");
}
<D3 showHide={(e)=>this.hanleShow(e)} />
子组件:
//params子组件的要给父组件传的值或者方法
this.props.showHide(params);
搞定,父组件就可以去到来自子组件的方法(数据)