forked from p96170835/amis
docs: ✏️ fix #FormItem
This commit is contained in:
parent
2736c5cb60
commit
f9ec2de1cc
|
@ -13,7 +13,7 @@
|
|||
- `addButtonText` 新增按钮文字,默认为 `"新增"`。
|
||||
- `minLength` 限制最小长度。
|
||||
- `maxLength` 限制最大长度。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="450" scope="form"
|
||||
[
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
- `options` 选项配置,类型为数组,成员格式如下。
|
||||
- `label` 文字
|
||||
- `value` 值
|
||||
- `source` Api 地址,如果选项不固定,可以通过配置 `source` 动态拉取。[详情](/docs/api#select) 另外也可以用 `$xxxx` 来获取当前作用域中的变量。
|
||||
更多配置请参考 [FormItem](#FormItem)。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- `source` Api 地址,如果选项不固定,可以通过配置 `source` 动态拉取。另外也可以用 `$xxxx` 来获取当前作用域中的变量。
|
||||
更多配置请参考 [FormItem](./FormItem.md)。
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="300" scope="form-item"
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- `option` 选项说明
|
||||
- `trueValue` 默认 `true`
|
||||
- `falseValue` 默认 `false`
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="200" scope="form-item"
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
- `extractValue` 默认为 `false`, `joinValues`设置为`false`时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。
|
||||
- `delimiter` 默认为 `,`
|
||||
- `columnsCount` 默认为 `1` 可以配置成一行显示多个。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="330" scope="form"
|
||||
[
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
- `type` 请设置成 `combo`
|
||||
- `multiple` 默认为 `false` 配置是否为多选模式
|
||||
- `controls` 配置组合成员,所有成员都是横向展示,可以是任意 [FormItem](#FormItem)
|
||||
- `controls` 配置组合成员,所有成员都是横向展示,可以是任意 [FormItem](./FormItem.md)
|
||||
- `controls[x].columnClassName` 列的类名,可以用它配置列宽度。默认平均分配。
|
||||
- `controls[x].unique` 设置当前列值是否唯一,即不允许重复选择。
|
||||
- `maxLength` 当 multiple 为 true 的时候启用,设置可以最大项数。
|
||||
|
@ -22,7 +22,7 @@
|
|||
- `minLength` 限制最小长度。
|
||||
- `maxLength` 限制最大长度。
|
||||
- `scaffold` 单条初始值。默认为 `{}`。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="450" scope="form"
|
||||
[
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- `inputFormat` 默认 `HH:mm` 用来配置显示的时间格式。
|
||||
- `minDate` 限制最小日期,可用 `${xxx}` 取值,或者输入相对时间,或者时间戳。如:`${start}`、`+3days`、`+3days+2hours`或者 `${start|default:-2days}+3days`
|
||||
- `maxDate` 限制最小日期,可用 `${xxx}` 取值,或者输入相对时间,或者时间戳。如:`${start}`、`+3days`、`+3days+2hours`或者 `${start|default:-2days}+3days`
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="250" scope="form"
|
||||
[
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
可用单位: `min`、`hour`、`day`、`week`、`month`、`year`。所有单位支持复数形式。
|
||||
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="250" scope="form"
|
||||
[
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
可用单位: `min`、`hour`、`day`、`week`、`month`、`year`。所有单位支持复数形式。
|
||||
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="250" scope="form"
|
||||
[
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
- `type` 请设置成 `editor` 或者 `bat-editor`、`c-editor`、`coffeescript-editor`、`cpp-editor`、`csharp-editor`、`css-editor`、`dockerfile-editor`、`fsharp-editor`、`go-editor`、`handlebars-editor`、`html-editor`、`ini-editor`、`java-editor`、`javascript-editor`、`json-editor`、`less-editor`、`lua-editor`、`markdown-editor`、`msdax-editor`、`objective-c-editor`、`php-editor`、`plaintext-editor`、`postiats-editor`、`powershell-editor`、`pug-editor`、`python-editor`、`r-editor`、`razor-editor`、`ruby-editor`、`sb-editor`、`scss-editor`、`sol-editor`、`sql-editor`、`swift-editor`、`typescript-editor`、`vb-editor`、`xml-editor`、`yaml-editor`。
|
||||
- `language` 默认为 `javascript` 当 `type` 为 `editor` 的时候有用。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="350" scope="form-item"
|
||||
{
|
||||
|
@ -20,7 +20,7 @@
|
|||
- `language` 默认为 `javascript` 当 `type` 为 `diff-editor` 的时候有用
|
||||
- `diffValue` 设置左侧编辑器的值,支持`${xxx}`获取变量
|
||||
- `disabled` 配置 **右侧编辑器** 是否可编辑,**左侧编辑器**始终不可编辑
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
PS: 当用作纯展示时,可以通过`value`配置项,设置右侧编辑器的值
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
- `startChunkApi` 默认 `/api/upload/startChunk` 想自己存储时才需要关注。
|
||||
- `chunkApi` 默认 `/api/upload/chunk` 想自己存储时才需要关注。
|
||||
- `finishChunkApi` 默认 `/api/upload/finishChunk` 想自己存储时才需要关注。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="250" scope="form-item"
|
||||
{
|
||||
|
|
|
@ -71,7 +71,7 @@ button-group 有两种模式,除了能让按钮组合在一起,还能做类
|
|||
- 多选模式:选中的多个选项的 `value` 会通过 `delimiter` 连接起来,否则直接将以数组的形式提交值。
|
||||
- `delimiter` 默认为 `,`
|
||||
- `clearable` 默认为 `true`, 表示可以取消选中。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="250" scope="form"
|
||||
[
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
- 多选模式:选中的多个选项的 `value` 会通过 `delimiter` 连接起来,否则直接将以数组的形式提交值。
|
||||
- `delimiter` 默认为 `,`
|
||||
- `clearable` 默认为 `true`, 表示可以取消选中。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
单选
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
| columns[x].quickEdit | `boolean` 或者 `object` | - | 配合 editable 为 true 一起使用 |
|
||||
| columns[x].quickEditOnUpdate | `boolean` 或者 `object` | - | 可以用来区分新建模式和更新模式的编辑配置 |
|
||||
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
- 更多 Demo 详情请参考 [表格编辑](/docs/examples/form/table)
|
||||
|
||||
```schema:height="250" scope="form-item"
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
- `minHeight` 限制图片最小高度。
|
||||
- `maxWidth` 限制图片最大宽度。
|
||||
- `maxHeight` 限制图片最大高度。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="250" scope="form-item"
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
- `rows` 行信息, 数组中 `label` 字段是必须给出的
|
||||
- `rowLabel` 行标题说明
|
||||
- `source` Api 地址,如果选项不固定,可以通过配置 `source` 动态拉取。[详情](/docs/api#matrix)
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="250" scope="form-item"
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
- 多选模式:选中的多个选项的 `value` 会通过 `delimiter` 连接起来,否则直接将以数组的形式提交值。
|
||||
- `extractValue` 默认为 `false`, `joinValues`设置为`false`时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。
|
||||
- `delimiter` 默认为 `,`
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="300" scope="form-item"
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
- `delimiter` 默认为 `,`
|
||||
- `modalMode` 设置 `dialog` 或者 `drawer`,用来配置弹出方式。
|
||||
- `pickerSchema` 默认为 `{mode: 'list', listItem: {title: '${label}'}}`, 即用 List 类型的渲染,来展示列表信息。更多的玩法请参考 [CRUD](#crud) 的配置。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="300" scope="form-item"
|
||||
{
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
- `value` 值
|
||||
- `source` Api 地址,如果选项不固定,可以通过配置 `source` 动态拉取。[详情](/docs/api#select)
|
||||
- `columnsCount` 默认为 `1` 可以配置成一行显示多个。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="330" scope="form"
|
||||
[
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
- `type` 请设置成 `repeat`
|
||||
- `options` 默认: `hourly,daily,weekly,monthly`, 可用配置 `secondly,minutely,hourly,daily,weekdays,weekly,monthly,yearly`
|
||||
- `placeholder` 默认为 `不重复`, 当不指定值时的说明。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="300" scope="form-item"
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
```
|
||||
|
||||
- `options` Object 类型,给富文本的配置信息。请参考 https://www.froala.com/wysiwyg-editor/docs/options
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="350" scope="form-item"
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- `options` 选项配置,类型为数组,成员格式如下。
|
||||
- `label` 文字
|
||||
- `value` 值
|
||||
- `source` Api 地址,如果选项不固定,可以通过配置 `source` 动态拉取。[详情](/docs/api#select) 另外也可以用 `$xxxx` 来获取当前作用域中的变量。
|
||||
- `source` Api 地址,如果选项不固定,可以通过配置 `source` 动态拉取。另外也可以用 `$xxxx` 来获取当前作用域中的变量。
|
||||
- `autoComplete` 跟 source 不同的是,每次用户输入都会去接口获取提示。
|
||||
- `multiple` 默认为 `false`, 设置成 `true` 表示可多选。
|
||||
- `joinValues` 默认为 `true`
|
||||
|
@ -16,7 +16,7 @@
|
|||
- `delimiter` 默认为 `,`
|
||||
- `clearable` 默认为 `false`, 当设置为 `true` 时,已选中的选项右侧会有个小 `X` 用来取消设置。
|
||||
- `searchable` 默认为 `false`,表示可以通过输入部分内容检索出选项。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
单选
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ formItem 还可以是子表单类型。
|
|||
- `form` 字表单的配置
|
||||
`title` 标题
|
||||
`controls` 请参考 [Form](#/form) 中的配置说明。
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="400" scope="form"
|
||||
[
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
- `option` 选项说明
|
||||
- `trueValue` 默认 `true`
|
||||
- `falseValue` 默认 `false`
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="200" scope="form-item"
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
可用单位: `min`、`hour`、`day`、`week`、`month`、`year`。所有单位支持复数形式。
|
||||
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="250" scope="form"
|
||||
[
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
- 多选模式:选中的多个选项的 `value` 会通过 `delimiter` 连接起来,否则直接将以数组的形式提交值。
|
||||
- `extractValue` 默认为 `false`, `joinValues`设置为`false`时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。
|
||||
- `delimiter` 默认为 `,`
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="300" scope="form-item"
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
- 多选模式:选中的多个选项的 `value` 会通过 `delimiter` 连接起来,否则直接将以数组的形式提交值。
|
||||
- `extractValue` 默认为 `false`, `joinValues`设置为`false`时生效, 开启后将选中的选项 value 的值封装为数组,作为当前表单项的值。
|
||||
- `delimiter` 默认为 `,`
|
||||
- 更多配置请参考 [FormItem](#FormItem)
|
||||
- 更多配置请参考 [FormItem](./FormItem.md)
|
||||
|
||||
```schema:height="300" scope="form-item"
|
||||
{
|
||||
|
|
|
@ -128,7 +128,7 @@ AMis 所有值为 url 的如: `"http://www.baidu.com"` 都会被替换成 prox
|
|||
### 表达式
|
||||
|
||||
配置项中,所有 `boolean` 类型的配置,都可以用 JS 表达式来配置。所有`boolean` 配置项,后面加个 `On` 则是表达式配置方式,可以用 js 语法来根据当前模型中的数据来决定是否启用。
|
||||
如:[FormItem](#FormItem) 中的 `disabledOn`、`hiddenOn`、`visibleOn`、[CRUD](#CRUD) 中的 `itemDraggableOn` 等等。
|
||||
如:[FormItem](./FormItem.md) 中的 `disabledOn`、`hiddenOn`、`visibleOn`、[CRUD](#CRUD) 中的 `itemDraggableOn` 等等。
|
||||
|
||||
```schema:height="300" scope="form"
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue