getInitialState:function(){ return { password:'', trueName:'', idcard:'', reidcard:'' } }, onPassChange:function(e){ this.setState({password:e.target.value}) }, onTrueNameChange:function(e){ this.setState({trueName:e.target.value}) }, onIdcardChange:function(e){ this.setState({idcard:e.target.value}) }, onReidcardChange:function(e){ this.setState({reidcard:e.target.value}) },
上面这段代码是对四个文本框的value的操作,怎么把这四个方法用一个方法来封装呢
翻阅古今
相关分类