igroot-form-container

0.0.9 • Public • Published

表单容器组件

何时使用

需要构建表单获取表单字段的时候使用

安装方法

sl add -c igroot-form-container
```

## API

````jsx
<FormContainer>
  <Row>
    <Col span={8}>
      <FormItem label="备注" name="comment">
        <Input placeholder='输入要搜索的备注关键字'/>
      </FormItem>
    </Col>
    <Col span={8}>
      <FormOption
        option={['submit', 'reset']}
        submitText="搜索"
        onSubmit={this.handleSubmit}
      />
    </Col>
  </Row>
</FormContainer>
```

### FormContainer

| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| onGetForm | 获取当前 form | function(form) | - |


### FormItem
fieldProps, initialValue, required, label
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| label | 标题 | String | - |
| name | 字段名 | String | - |
| initialValue | 初始值|  |  |
| required | 是否必填 | boolean | false |
| fieldProps | 扩展属性 | 对象 |  |

### FormOptiton

| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |

Readme

Keywords

Package Sidebar

Install

npm i igroot-form-container

Weekly Downloads

6

Version

0.0.9

License

MIT

Unpacked Size

12.5 kB

Total Files

12

Last publish

Collaborators

  • smoclock