摘要:
constructor(props){ super(props) this.myRefs = React.createRef(); } refFun(){ const node = this.myRefs.current node.style.color = "red" } render() { r 阅读全文
摘要:
注 : React.PropTypes 在 React v15.5 版本后已经移到了 prop-types 库。 import PropTypes from 'prop-types' render(){ return ( <div> <div>111</div> //子组件可以{...this.pr 阅读全文
摘要:
//子组件(传参数) < input type = "button" value = "提交" onClick = { ()=>{ this.props.handleChange('123') } } / > //子组件(传输入值) < input onChange = { this.props.h 阅读全文