2019-06-04 20:13:40 +08:00
|
|
|
## Tabs
|
2019-05-10 12:13:30 +08:00
|
|
|
|
|
|
|
| 属性名 | 类型 | 默认值 | 说明 |
|
|
|
|
| ----------------- | ----------------------- | ----------------------------------- | -------------------------------------------------------- |
|
|
|
|
| type | `string` | `"tabs"` | 指定为 Tabs 渲染器 |
|
|
|
|
| className | `string` | | 外层 Dom 的类名 |
|
|
|
|
| tabsClassName | `string` | | Tabs Dom 的类名 |
|
|
|
|
| tabs | `Array` | | tabs 内容 |
|
2020-01-13 20:45:40 +08:00
|
|
|
| toolbar | [Container](./Types.md#container) | | tabs 中的工具栏 |
|
2020-01-13 20:27:38 +08:00
|
|
|
| toolbarClassName | `string` | | tabs 中工具栏的类名 |
|
2019-05-10 12:13:30 +08:00
|
|
|
| tabs[x].title | `string` | | Tab 标题 |
|
|
|
|
| tabs[x].icon | `icon` | | Tab 的图标 |
|
2020-01-13 20:45:40 +08:00
|
|
|
| tabs[x].tab | [Container](./Types.md#container) | | 内容区 |
|
2019-05-10 12:13:30 +08:00
|
|
|
| tabs[x].hash | `string` | | 设置以后将跟 url 的 hash 对应 |
|
|
|
|
| tabs[x].reload | `boolean` | | 设置以后内容每次都会重新渲染,对于 crud 的重新拉取很有用 |
|
2019-06-11 10:09:44 +08:00
|
|
|
| tabs[x].unmountOnExit | `boolean` | | 每次退出都会销毁当前tab栏内容 |
|
2019-05-10 12:13:30 +08:00
|
|
|
| tabs[x].className | `string` | `"bg-white b-l b-r b-b wrapper-md"` | Tab 区域样式 |
|
|
|
|
|
2020-01-13 20:27:38 +08:00
|
|
|
```schema:height="500" scope="body"
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"type": "tabs",
|
|
|
|
"tabs": [
|
|
|
|
{
|
|
|
|
"title": "Tab 1",
|
|
|
|
"tab": "Content 1"
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
"title": "Tab 2",
|
|
|
|
"tab": "Content 2"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "tabs",
|
|
|
|
"toolbar": [
|
|
|
|
{
|
|
|
|
"type": "button",
|
|
|
|
"label": "按钮",
|
|
|
|
"actionType": "dialog",
|
|
|
|
"dialog": {
|
|
|
|
"title": "弹窗标题",
|
|
|
|
"body": "你点击了"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"tabs": [
|
|
|
|
{
|
|
|
|
"title": "Tab 1",
|
|
|
|
"tab": "Content 1"
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
"title": "Tab 2",
|
|
|
|
"tab": "Content 2"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
2019-05-10 12:13:30 +08:00
|
|
|
```
|