export default class CreateMenu extends React.Component {
constructor(props) {
super(props);
}
goToStage = event => {
console.log(event.target.value);
if (event.target.value < this.props.stage) {
console.log('true')
}
};
render() {
return (
<div className="campaign-pagination">
<ul>
<li>
<span value={0} onClick={this.goToStage} className={this.props.menu.home} title="Info">
<AlignLeft />
<span className="navigation-text">1. Info</span>
</span>
</li>
尝试从值设置为0的范围访问“ event.target.value”。出于某种原因,它仅返回null。