<button ref={(btn)=>{this.btn=btn}}>按钮</button>componentDidMount(){ console.log(this.btn)}
<button ref={(btn)=>{this.btn=btn}}>按钮</button>
componentDidMount(){
console.log(this.btn)
}
若有收获,就点个赞吧
0 人点赞
让时间为你证明