Taro父子组件通信

父组件

  testEvent = () =>{
    console.log('abc123')
  }

 <Test test={1231323} onTestEvent={this.testEvent}></Test>

 子组件

  abc(){
    this.props.onTestEvent();
  console.log(this.props.test) } render () { return ( <View onClick={this.abc}> {this.props.test} </View> ) }
原文地址:https://www.cnblogs.com/anxiaoyu/p/10312749.html