{...formItemLayout} 标签布局

 {...formItemLayout}是reactjs中属性的写法{...props},formItemLayout标签布局,wrapperCol需要为输入控件设置布局样式时,和label 标签布局,通 <Col> 组件,设置 span offset 值,如{span: 3, offset: 12}

const formItemLayout = {
  labelCol: {
    xs: { span: 24 },
    sm: { span: 7 },
  },
  wrapperCol: {
    xs: { span: 24 },
    sm: { span: 12 },
    md: { span: 10 },
  },
};
 
<FormItem {...formItemLayout} label="标题">
  {getFieldDecorator('title', {
    rules: [
      {
        required: true,
        message: '请输入标题',
      },
    ],
  })(<Input placeholder="给目标起个名字" />)}
</FormItem>