1.0.30 • Published 6 years ago
antd-pc-form-package v1.0.30
Coding......
antd-pc-form-package
Through the strategy pattern, the form encapsulation is designed to simplify the development difficulty of antd-design on PC.
Target Plan
| Form Type Plan | Progress | Version |
|---|---|---|
| Input | done | v1.0.0 |
| Number Input | done | v1.0.0 |
| Radio | done | v1.0.0 |
| Checkbox | done | v1.0.0 |
| Select | done | v1.0.0 |
| Switch | done | v1.0.0 |
| Date Picker | done | v1.0.0 |
| Tree Select | coding | |
| ... |
Dependency
$ npm install antd --save-devUsage
$ npm install antd-pc-form-packageimport {FormPackage} from "antd-pc-form-package";
<FormPackage dataSource={dataSource} getFormValues={this.getFormValues}/>dataSource
{
key: 1,
type: 1,
name: 'name',
label: 'name',
value: '',
placeholder: 'input name',
rules: [
{required: true, message: 'input name'},
],
icon: <Icon type="user" style={{ color: 'red' }} />,
},| Property | Description | Type | Default | Required |
|---|---|---|---|---|
| key | Unique identification number | Number | True | |
| type | Form type | String | INPUT | False |
| name | Name | String | True | |
| label | String | False | ||
| value | Number | string | Boolean | False | ||
| placeholder | String | FormItem._placeholder | False | |
| rules | Object | {required: true, message:FormItem._placeholder} | False | |
| icon | Component | False | ||
| trigger | Validate trigger | String | 'onBlur' | False |
| source | radio, checkbox, select etc must be need | Array[] | False |
'type' enumerations
| Type | Description |
|---|---|
| INPUT | 文本输入框 |
| NUMBER_INPUT | 数字输入框 |
| RADIO | 单选框 |
| CHECKBOX | 多选框 |
| SELECT | 下拉框 |
| SWITCH | 开关 |
| DATE_PICKER | 日期选择框 |
| TREE_SELECT | 树选择器 |
API
| Property | Description | Type | Default | Version |
|---|---|---|---|---|
| dataSource | form configs | object | v1.0.0 | |
| getFormValues | get form values | Function(values) | v1.0.0 |
Contact
- Email: newweber@163.com
- Github: https://github.com/houchaowei/antd-pc-form-package
- Issues: https://github.com/houchaowei/antd-pc-form-package/issues
1.0.30
6 years ago
1.0.29
6 years ago
1.0.28
6 years ago
1.0.22
6 years ago
1.0.21
6 years ago
1.0.26
6 years ago
1.0.25
6 years ago
1.0.24
6 years ago
1.0.23
6 years ago
1.0.27
6 years ago
1.0.20
6 years ago
1.0.19
6 years ago
1.0.18
6 years ago
1.0.17
6 years ago
1.0.16
6 years ago
1.0.15
6 years ago
1.0.14
6 years ago
1.0.13
6 years ago
1.0.12
6 years ago
1.0.11
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.8
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago
0.1.12
6 years ago
0.1.11
6 years ago
0.1.10
6 years ago
0.1.9
6 years ago
0.1.8
6 years ago
0.1.7
6 years ago
0.1.6
6 years ago
0.1.5
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.1.1
6 years ago
0.1.0
6 years ago