diff --git a/docs/components/form/tabs.md b/docs/components/form/tabs.md index 6367cb480..99388bf88 100755 --- a/docs/components/form/tabs.md +++ b/docs/components/form/tabs.md @@ -17,55 +17,52 @@ order: 53 "type": "form", "debug": true, "controls": [ + { + "type": "tabs", + "tabs": [ { - "type": "tabs", - "tabs": [ - { - "title": "基本配置", - "controls": [ - { - "name": "text1", - "type": "text", - "label": "文本1" + "title": "基本配置", + "controls": [ + { + "name": "text1", + "type": "text", + "label": "文本1" + }, + + { + "name": "text2", + "type": "text", + "label": "文本2" + } + ] }, { - "name": "text2", - "type": "text", - "label": "文本2" - } - ] - }, + "title": "其他配置", + "controls": [ + { + "name": "text3", + "type": "text", + "label": "文本3" + }, - { - "title": "其他配置", - "controls": [ - { - "name": "text3", - "type": "text", - "label": "文本3" - }, - - { - "name": "text4", - "type": "text", - "label": "文本4" + { + "name": "text4", + "type": "text", + "label": "文本4" + } + ] } ] } ] -} - ] } ``` +## 更多功能 + +请参考[这里](../tabs)。 + ## 属性表 -| 属性名 | 类型 | 默认值 | 说明 | -| ---------------- | ------------------------------------ | ------ | ------------------- | -| tabs | `Array` | | tabs 内容 | -| toolbar | [SchemaNode](../../types/schemanode) | | tabs 中的工具栏 | -| toolbarClassName | `string` | | tabs 中工具栏的类名 | -| tabs[x].title | `string` | | Tab 标题 | -| tabs[x].body | [SchemaNode](../../types/schemanode) | | 内容容器 | -| tabs[x].controls | Array<[表单项](./formitem)> | | 表单项集合。 | +请参考[这里](../tabs#属性表)。 diff --git a/docs/components/tabs.md b/docs/components/tabs.md index 94d48cbdf..31db8ad94 100755 --- a/docs/components/tabs.md +++ b/docs/components/tabs.md @@ -98,6 +98,29 @@ order: 68 } ``` +### 垂直 + +```schema:height="300" scope="body" +{ + "type": "tabs", + "mode": "vertical", + "tabs": [ + { + "title": "选项卡1", + "body": "选项卡内容1" + }, + { + "title": "选项卡2", + "body": "选项卡内容2" + }, + { + "title": "选项卡3", + "body": "选项卡内容3" + } + ] +} +``` + ## 配置顶部工具栏 配置`toolbar`实现顶部工具栏。 @@ -211,6 +234,7 @@ order: 68 | --------------------- | --------------------------------- | ----------------------------------- | -------------------------------------------------------- | | type | `string` | `"tabs"` | 指定为 Tabs 渲染器 | | className | `string` | | 外层 Dom 的类名 | +| mode | `string` | | 展示模式,取值可以是 `line`、`card`、`radio`、`vertical` | | tabsClassName | `string` | | Tabs Dom 的类名 | | tabs | `Array` | | tabs 内容 | | toolbar | [SchemaNode](../types/schemanode) | | tabs 中的工具栏 | diff --git a/examples/components/Tabs/Normal.jsx b/examples/components/Tabs/Normal.jsx index e43c73ab9..75602f0ca 100644 --- a/examples/components/Tabs/Normal.jsx +++ b/examples/components/Tabs/Normal.jsx @@ -158,6 +158,35 @@ export default { body: '选项卡内容3' } ] + }, + { + type: 'divider' + }, + { + type: 'tabs', + mode: 'vertical', + tabs: [ + { + title: '选项卡1', + body: '选项卡内容1' + }, + { + title: '选项卡2', + body: '选项卡内容2' + }, + { + title: '选项卡3', + body: '选项卡内容3' + }, + { + title: '选项卡4', + body: '选项卡内容4' + }, + { + title: '选项卡5', + body: '选项卡内容5' + } + ] } ] };