2020-07-28 10:03:53 +08:00
|
|
|
---
|
|
|
|
title: Button-Toolbar 按钮工具栏
|
2020-07-29 16:20:21 +08:00
|
|
|
description:
|
2020-07-28 10:03:53 +08:00
|
|
|
type: 0
|
|
|
|
group: null
|
|
|
|
menuName: Button-Toolbar
|
2020-07-29 16:20:21 +08:00
|
|
|
icon:
|
2020-07-28 10:03:53 +08:00
|
|
|
order: 5
|
|
|
|
---
|
2020-07-29 16:20:21 +08:00
|
|
|
|
2021-01-04 20:10:08 +08:00
|
|
|
默认按钮会独占一行,如果想让多个按钮并排方式,可以使用 `button-toolbar` 组件包裹起来,另外还有能用 [button-group](./button-group) 来在展现上更紧凑。
|
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",
|
|
|
|
"controls": [
|
|
|
|
{
|
|
|
|
"type": "text",
|
|
|
|
"name": "test",
|
|
|
|
"label": "Text"
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
"type": "button-toolbar",
|
|
|
|
"label": "按钮组",
|
|
|
|
"buttons": [
|
|
|
|
{
|
|
|
|
"type": "button",
|
|
|
|
"label": "按钮",
|
|
|
|
"actionType": "dialog",
|
|
|
|
"dialog": {
|
|
|
|
"title": "提示",
|
|
|
|
"body": "对,你刚点击了!"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
"type": "submit",
|
|
|
|
"label": "提交"
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
"type": "reset",
|
|
|
|
"label": "重置"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## 属性表
|
|
|
|
|
2020-07-29 16:20:21 +08:00
|
|
|
| 属性名 | 类型 | 默认值 | 说明 |
|
|
|
|
| ------- | --------------------------- | ------------------ | ------------------------- |
|
|
|
|
| type | `string` | `"button-toolbar"` | 指定为 ButtonToolbar 组件 |
|
|
|
|
| buttons | Array<[行为按钮](./action)> | | 按钮组 |
|