1.Warning: `defaultValue` is invalid for `getFieldDecorator` will set `value`, please use `option.initialValue` instead.
根据提示getFieldDecorator会修改value和defaultValue;解决办法在getFieldDecorator中需要用initalValue来设置值动态监听路由路径的变化
componentDidMount() {
this.props.history.listen(route => {
this.setState({
pathname:route.pathname
})
this.setState({
operatingState:route.query.action
})
})
}
网友评论