UNPKG

1.59 kBMarkdownView Raw
1# @sishuguojixuefu/react-native-form
2
3> 私塾动态表单项目
4
5## 特性
6
7- 根据特定的领域模型,自动匹配 Form 表单组件,自动映射数据
8- 基于 `rc-form` 实现自动表单校验
9- 支持以 `children` 的形式扩展组件
10
11## 安装
12
13> 如果要使用内置的组件,请确保安装并配置了 @sishuguojixuefu/antd-mobile-rn
14
15```sh
16$ yarn add @sishuguojixuefu/react-native-form
17```
18
19## 内置组件
20
21> 自定义内置组件的开发示例:http://t.cn/AijGYRMJ
22
23- Input: 普通的输入框
24- NumberInput: 数字输入框
25- SsSelect: 选择器
26- SsDate: 日期选择器
27- SsDateRange: 日期范围选择器
28- SsDescription: 描述组件
29- SsAmount: 金额输入组件
30- Switch: 开关组件
31
32> 一些特定业务组件无法内置,这种业务组件的开发请参考:http://t.cn/AijGjjVs
33
34## 属性
35
36| 属性 | 说明 | 类型 | 默认值 |
37| ------------------- | ----------------------------------------------------------- | ----------------------- | ------ |
38| wrappedComponentRef | `wrappedComponentRef={ref => {this.form = ref.props.form}}` | Function | - |
39| items | 动态表单渲染的依据,结构需严格遵守 FormItemsPropsType | `FormOptionPropsType[]` | - |
40| noBorder | 是否显示 border | boolean | true |
41| style | 样式 | object | - |