style: tabs

pull/5820/head
tangjinzhou 2022-05-21 17:38:19 +08:00
parent e6a46b43ac
commit a32d29149f
3 changed files with 4 additions and 5 deletions

View File

@ -27,7 +27,7 @@ Ant Design has 3 types of Tabs for different situations.
| hideAdd | Hide plus icon or not. Only works while `type="editable-card"` | boolean | `false` | } |
| size | preset tab bar size | `large` \| `default` \| `small` | `default` | |
| tabBarGutter | The gap between tabs | number | - | |
| tabBarStyle | Tab bar style object | object | - | |
| tabBarStyle | Tab bar style object | CSSProperties | - | |
| tabPosition | Position of tabs | `top` \| `right` \| `bottom` \| `left` | `top` | |
| type | Basic style of tabs | `line` \| `card` \| `editable-card` | `line` | |
@ -46,7 +46,7 @@ Ant Design has 3 types of Tabs for different situations.
| Events Name | Description | Arguments |
| --- | --- | --- |
| change | Callback executed when active tab is changed | Function(activeKey) {} |
| edit | Callback executed when tab is added or removed. Only works while `type="editable-card"` | (targetKey, action): void |
| edit | Callback executed when tab is added or removed. Only works while `type="editable-card"` | (action === 'add' ? event : targetKey, action): void |
| nextClick | Callback executed when next button is clicked | Function |
| prevClick | Callback executed when prev button is clicked | Function |
| tabClick | Callback executed when tab is clicked | Function |

View File

@ -31,7 +31,7 @@ Ant Design 依次提供了三级选项卡,分别用于不同的场景。
| hideAdd | 是否隐藏加号图标,在 `type="editable-card"` 时有效 | boolean | false | | |
| size | 大小,提供 `large` `default``small` 三种大小 | string | `default` | | |
| tabBarGutter | tabs 之间的间隙 | number | 无 | | |
| tabBarStyle | tab bar 的样式对象 | object | - | | |
| tabBarStyle | tab bar 的样式对象 | CSSProperties | - | | |
| tabPosition | 页签位置,可选值有 `top` `right` `bottom` `left` | string | `top` | | |
| type | 页签的基本样式,可选 `line`、`card` `editable-card` 类型 | string | `line` | | |
@ -50,7 +50,7 @@ Ant Design 依次提供了三级选项卡,分别用于不同的场景。
| 事件名称 | 说明 | 回调参数 |
| --- | --- | --- |
| change | 切换面板的回调 | Function(activeKey) {} |
| edit | 新增和删除页签的回调,在 `type="editable-card"` 时有效 | (targetKey, action): void |
| edit | 新增和删除页签的回调,在 `type="editable-card"` 时有效 | (action === 'add' ? event : targetKey, action): void |
| tabClick | tab 被点击的回调 | Function |
| tabScroll | 滚动 TabBar 是触发 | { direction: 'left' \| 'right' \| 'top' \| 'bottom' } |

View File

@ -12,7 +12,6 @@
.reset-component();
display: flex;
overflow: hidden;
// ========================== Navigation ==========================
> .@{tab-prefix-cls}-nav,