react 中子组件调用父组件的方法,通过props:
父组件:
isNote(data){
}
<div className="tabC01">
<FTab tabCon={'tabCon01'} note={(data)=>this.isNote(data)}/>
</div> 子组件:
<span className="wh01" >股票持仓(前十)<img src={require("../../image/annotation@2x.png")} className="iii" onClick={()=>this.props.note(data)} /></span>