1.0.30 • Published 4 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-dev
Usage
$ npm install antd-pc-form-package
import {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
4 years ago
1.0.29
4 years ago
1.0.28
4 years ago
1.0.22
4 years ago
1.0.21
4 years ago
1.0.26
4 years ago
1.0.25
4 years ago
1.0.24
4 years ago
1.0.23
4 years ago
1.0.27
4 years ago
1.0.20
4 years ago
1.0.19
4 years ago
1.0.18
4 years ago
1.0.17
4 years ago
1.0.16
4 years ago
1.0.15
4 years ago
1.0.14
4 years ago
1.0.13
4 years ago
1.0.12
4 years ago
1.0.11
4 years ago
1.0.10
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.1.12
4 years ago
0.1.11
4 years ago
0.1.10
4 years ago
0.1.9
4 years ago
0.1.8
4 years ago
0.1.7
4 years ago
0.1.6
4 years ago
0.1.5
4 years ago
0.1.4
4 years ago
0.1.3
4 years ago
0.1.2
4 years ago
0.1.1
4 years ago
0.1.0
4 years ago