mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-15 17:31:18 +08:00
65ac422ed6
* 补充容错 * fix: form 中 name 关联顶层数据初始化失效 * 更新 examples * 文档调整 * 删除多余的文档, 调整 schema * schema 调整 * schema 调整 * control 类型容器 control 改成 body * 修复一个选项加载的bug * form 注册直接用 type
60 lines
1.6 KiB
Markdown
Executable File
60 lines
1.6 KiB
Markdown
Executable File
---
|
|
title: Button-Toolbar 按钮工具栏
|
|
description:
|
|
type: 0
|
|
group: null
|
|
menuName: Button-Toolbar
|
|
icon:
|
|
order: 5
|
|
---
|
|
|
|
默认按钮会独占一行,如果想让多个按钮并排方式,可以使用 `button-toolbar` 组件包裹起来,另外还有能用 [button-group](./button-group) 来在展现上更紧凑。
|
|
|
|
## 基本使用
|
|
|
|
```schema: scope="body"
|
|
{
|
|
"type": "form",
|
|
"body": [
|
|
{
|
|
"type": "input-text",
|
|
"name": "test",
|
|
"label": "Text"
|
|
},
|
|
|
|
{
|
|
"type": "button-toolbar",
|
|
"label": "按钮组",
|
|
"buttons": [
|
|
{
|
|
"type": "button",
|
|
"label": "按钮",
|
|
"actionType": "dialog",
|
|
"dialog": {
|
|
"title": "提示",
|
|
"body": "对,你刚点击了!"
|
|
}
|
|
},
|
|
|
|
{
|
|
"type": "submit",
|
|
"label": "提交"
|
|
},
|
|
|
|
{
|
|
"type": "reset",
|
|
"label": "重置"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
## 属性表
|
|
|
|
| 属性名 | 类型 | 默认值 | 说明 |
|
|
| ------- | --------------------------- | ------------------ | ------------------------- |
|
|
| type | `string` | `"button-toolbar"` | 指定为 ButtonToolbar 组件 |
|
|
| buttons | Array<[行为按钮](./action)> | | 按钮组 |
|