This commit is contained in:
rickcole 2019-05-23 18:12:47 +08:00
parent 58d0bcc544
commit 13a8144cfd
1 changed files with 43 additions and 43 deletions

View File

@ -27,9 +27,8 @@
``` ```
| 属性名 | 类型 | 默认值 | 说明 | | 属性名 | 类型 | 默认值 | 说明 |
| --------------------------- | ------------------------------------ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | --------------------- | ------------------------------------ | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| type | `string` | | `"form"` 指定为 Form 渲染器 | | type | `string` | | `"form"` 指定为 Form 渲染器 |
| name | `string` | | 设置一个名字后,方便其他组件与其通信 |
| mode | `string` | `normal` | 表单展示方式,可以是:`normal`、`horizontal` 或者 `inline` | | mode | `string` | `normal` | 表单展示方式,可以是:`normal`、`horizontal` 或者 `inline` |
| horizontal | `Object` | `{"left":"col-sm-2", "right":"col-sm-10", "offset":"col-sm-offset-2"}` | 当 mode 为 `horizontal` 时有用,用来控制 label | | horizontal | `Object` | `{"left":"col-sm-2", "right":"col-sm-10", "offset":"col-sm-offset-2"}` | 当 mode 为 `horizontal` 时有用,用来控制 label |
| title | `string` | `"表单"` | Form 的标题 | | title | `string` | `"表单"` | Form 的标题 |
@ -68,7 +67,8 @@
| autoFocus | `boolean` | `false` | 是否自动聚焦。 | | autoFocus | `boolean` | `false` | 是否自动聚焦。 |
| canAccessSuperData | `boolean` | `true` | 指定是否可以自动获取上层的数据并映射到表单项上 | | canAccessSuperData | `boolean` | `true` | 指定是否可以自动获取上层的数据并映射到表单项上 |
| persistData | `boolean` | `true` | 指定表单是否开启本地缓存 | | persistData | `boolean` | `true` | 指定表单是否开启本地缓存 |
| clearPersistDataAfterSubmit | `boolean` | `true` | 指定表单是否提交成功后清空本地缓存 | | clearPersistDataAfterSubmit | `boolean` | `true` | 指定表单提交成功后是否清除本地缓存 |
| name | `string` | | 设置一个名字后,方便其他组件与其通信 |
表单项都是通过 controls 设置的,类型是数组,成员主要是[FormItem](./FormItem.md),默认一行一个(当然 form 是 inline 模式时例外),如果想一行多个,可以将多个[FormItem](./FormItem.md)放在一个 [Group](./Group.md) 里面。 表单项都是通过 controls 设置的,类型是数组,成员主要是[FormItem](./FormItem.md),默认一行一个(当然 form 是 inline 模式时例外),如果想一行多个,可以将多个[FormItem](./FormItem.md)放在一个 [Group](./Group.md) 里面。