2020-07-28 10:03:53 +08:00
|
|
|
---
|
|
|
|
title: Panel 面板
|
2020-07-29 16:20:21 +08:00
|
|
|
description:
|
2020-07-28 10:03:53 +08:00
|
|
|
type: 0
|
|
|
|
group: null
|
|
|
|
menuName: Panel
|
2020-07-29 16:20:21 +08:00
|
|
|
icon:
|
2020-07-28 10:03:53 +08:00
|
|
|
order: 34
|
|
|
|
---
|
2020-07-29 16:20:21 +08:00
|
|
|
|
2021-01-07 23:35:03 +08:00
|
|
|
展现上将多个 [表单项](./formItem) 放同一个容器下。
|
2020-07-28 10:03:53 +08:00
|
|
|
|
|
|
|
## 基本用法
|
|
|
|
|
2021-01-07 23:35:03 +08:00
|
|
|
```schema: scope="body"
|
2020-07-28 10:03:53 +08:00
|
|
|
{
|
|
|
|
"type": "form",
|
2021-01-19 10:20:09 +08:00
|
|
|
"api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/form/saveForm",
|
2020-07-28 10:03:53 +08:00
|
|
|
"controls": [
|
|
|
|
{
|
|
|
|
"type": "panel",
|
|
|
|
"controls": [
|
|
|
|
{
|
|
|
|
"name": "text",
|
|
|
|
"type": "text",
|
|
|
|
"label": "text"
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
"name": "text2",
|
|
|
|
"type": "text",
|
|
|
|
"label": "text2"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## 属性表
|
|
|
|
|
2020-07-29 16:20:21 +08:00
|
|
|
| 属性名 | 类型 | 默认值 | 说明 |
|
|
|
|
| --------------- | ------------------------------------ | ------ | ------------------------------------------------------------------- |
|
|
|
|
| title | `string` | | panel 标题 |
|
|
|
|
| body | [SchemaNode](../../types/schemanode) | | 内容区 |
|
|
|
|
| bodyClassName | `string` | | body 的 className |
|
|
|
|
| footer | [SchemaNode](../../types/schemanode) | | 底部区 |
|
|
|
|
| footerClassName | `string` | | footer 的 className |
|
|
|
|
| controls | Array<表单项> | | `controls` 跟 `body` 二选一,如果设置了 controls 优先显示表单集合。 |
|
|
|
|
|
|
|
|
- `title` panel 标题
|
2020-07-29 17:33:14 +08:00
|
|
|
- `body` [SchemaNode](../../types/schemanode) 可以是其他渲染模型。
|
2020-07-29 16:20:21 +08:00
|
|
|
- `bodyClassName` body 的 className.
|
2020-07-29 17:33:14 +08:00
|
|
|
- `footer` [SchemaNode](../../types/schemanode) 可以是其他渲染模型。
|
2020-07-29 16:20:21 +08:00
|
|
|
- `footerClassName` footer 的 className.
|
|
|
|
- `controls` 跟 `body` 二选一,如果设置了 controls 优先显示表单集合。
|