### 动态插入FormItem时候的warning Warning: Cannot use `setFieldsValue` until you use `getFieldDecorator` or `getFieldProps` to register it. 解决方法:这是因为我们的setState是异步的,所以虽然在`前面调用了setState`,但是动态插入的FormItem本身还没有渲染出来,即没有调用`getFieldDecorator`,所以我们可以采用下面的方式来完成 ```js this.setState({},()=>{ //这里处理逻辑 }) ``` ### 为table中每一个row都指定一个key Warning: Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key. 解决方法如下: ```js
warning.js:35 Warning: Failed prop type: Invalid prop `value` supplied to `Select`.
in Select (created by Select)
in Select (created by WhiteListForm)
in div (created by FormItem)
in div (created by Col)
in Col (created by FormItem)
in div (created by Row)
in Row (created by FormItem)
in FormItem (created by WhiteListForm)
in form (created by Form)
in Form (created by WhiteListForm)
in div (created by WhiteListForm)
in WhiteListForm (created by Unknown)
in Unknown (created by WhiteListForm)
in WhiteListForm (created by App)
in div (created by Dialog)
in div (created by Dialog)
in div (created by LazyRenderBox)
in LazyRenderBox (created by Dialog)
in AnimateChild (created by Animate)
in Animate (created by Dialog)
in div (created by Dialog)
in div (created by Dialog)
in Dialog
比如下面就是将Number类型转化为string类型:
```js