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>



相关文章:

  • 2022-12-23
  • 2021-09-10
  • 2021-09-15
  • 2022-12-23
  • 2021-10-23
  • 2022-03-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案