getvaluefromevent专题

getFieldDecorator添加事件监听getValueFromEvent

{getFieldDecorator("ratio", {initialValue: ratio,getValueFromEvent: e => {this.setState({currentValue: Number(e.target.value),});return e.target.value;},rules: [{required: true,message: `中奖概率`,},],})