From a32d29149fe7ffd648bbf36701a83f888e797a4c Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sat, 21 May 2022 17:38:19 +0800 Subject: [PATCH] style: tabs --- components/tabs/index.en-US.md | 4 ++-- components/tabs/index.zh-CN.md | 4 ++-- components/tabs/style/index.less | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/components/tabs/index.en-US.md b/components/tabs/index.en-US.md index c3115d0d1..8d26eaf7d 100644 --- a/components/tabs/index.en-US.md +++ b/components/tabs/index.en-US.md @@ -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 | diff --git a/components/tabs/index.zh-CN.md b/components/tabs/index.zh-CN.md index c8a284fb5..6e1ede580 100644 --- a/components/tabs/index.zh-CN.md +++ b/components/tabs/index.zh-CN.md @@ -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' } | diff --git a/components/tabs/style/index.less b/components/tabs/style/index.less index 4947f57a3..0ff9cbc1a 100644 --- a/components/tabs/style/index.less +++ b/components/tabs/style/index.less @@ -12,7 +12,6 @@ .reset-component(); display: flex; - overflow: hidden; // ========================== Navigation ========================== > .@{tab-prefix-cls}-nav,