标签:生效 hand option this 组件 sel receive ext isp
componentWillReceiveProps(nextProps){
不加判断 会可能导致组件本身 setState不生效
if(nextProps.isPersonEdit !==this.props.isPersonEdit){
if(‘isPersonEdit‘ in nextProps){
this.setState({isEdit:nextProps.isPersonEdit})
}
}
}
handleSelect(value,option){
this.setState({isEdit:true})
}
react componentWillReceiveProps
标签:生效 hand option this 组件 sel receive ext isp
原文地址:http://www.cnblogs.com/leijuan/p/6897712.html