powerdong / myProblems

我用到了,你可能用到
0 stars 1 forks source link

React 点击传值 #35

Open powerdong opened 4 years ago

powerdong commented 4 years ago
<button onClick={this.handleClick.bind(this, props0, props1, ...}></button>

handleClick(porps0, props1, ..., event) {
    // your code here
}

<button onClick={(ev) => {this.handleClick(ev, arg1, arg2,……)}}/>

handleClick(ev, arg1, arg,……) {
   //code
}