

<DemoTitle title="Tabs" desc="用户可以通过点击不同的标签在同一页面中查看不同的内容区域。">
#### API

| 属性名 | 描述 | 类型 | 默认值 | 
|--------|--------|--------|--------|
| type | 类型 | 'line' \| 'card' \| 'editable-card' \| 'segmented' | true | 
| className | 类名 | string | '' | 


<AntdApiRef url="https://ant.design/components/tabs-cn/#api"></AntdApiRef>


## antd API

通用属性参考：[通用属性](/docs/react/common-props)

### Tabs

| 参数 | 说明 | 类型 | 默认值 | 版本 | 
|--------|--------|--------|--------|--------|
| activeKey | 当前激活 tab 面板的 key | string | - |  | 
| addIcon | 自定义添加按钮，设置  | ReactNode |  | 4.4.0 | 
| animated | 是否使用动画切换 Tabs | boolean\| { inkBar: boolean, tabPane: boolean } | { inkBar: true, tabPane: false } |  | 
| centered | 标签居中展示 | boolean | false | 4.4.0 | 
| defaultActiveKey | 初始化选中面板的 key，如果没有设置 activeKey | string | 第一个面板的 key |  | 
| hideAdd | 是否隐藏加号图标，在  | boolean | false |  | 
| indicator | 自定义指示条的长度和对齐方式 | { size?: number \| (origin: number) => number; align:  | - | 5.13.0 | 
| items | 配置选项卡内容 |  | [] | 4.23.0 | 
| more | 自定义折叠菜单属性 |  | { icon:  |  | 
| removeIcon | 自定义删除按钮，设置  | ReactNode |  | 5.15.0 | 
| popupClassName | 更多菜单的  | string | - | 4.21.0 | 
| renderTabBar | 替换 TabBar，用于二次封装标签头 | (props: DefaultTabBarProps, DefaultTabBar: React.ComponentClass) => React.ReactElement | - |  | 
| size | 大小，提供  | string | middle |  | 
| tabBarExtraContent | tab bar 上额外的元素 | ReactNode \| {left?: ReactNode, right?: ReactNode} | - | object: 4.6.0 | 
| tabBarGutter | tabs 之间的间隙 | number | - |  | 
| tabBarStyle | tab bar 的样式对象 | CSSProperties | - |  | 
| tabPosition | 页签位置，可选值有  | string | top |  | 
| destroyOnHidden | 被隐藏时是否销毁 DOM 结构 | boolean | false | 5.25.0 | 
| onChange | 切换面板的回调 | (activeKey: string) => void | - |  | 
| onEdit | 新增和删除页签的回调，在  | (action === 'add' ? event : targetKey, action) => void | - |  | 
| onTabClick | tab 被点击的回调 | (key: string, event: MouseEvent) => void | - |  | 
| onTabScroll | tab 滚动时触发 | ({ direction:  | - | 4.3.0 | 


更多属性查看 [rc-tabs tabs](https://github.com/react-component/tabs#tabs)

### TabItemType

| 参数 | 说明 | 类型 | 默认值 | 版本 | 
|--------|--------|--------|--------|--------|
| closeIcon | 自定义关闭图标，在  | ReactNode | - |  | 
| destroyOnHidden | 被隐藏时是否销毁 DOM 结构 | boolean | false | 5.25.0 | 
| disabled | 禁用某一项 | boolean | false |  | 
| forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false |  | 
| key | 对应 activeKey | string | - |  | 
| label | 选项卡头显示文字 | ReactNode | - |  | 
| icon | 选项卡头显示图标 | ReactNode | - | 5.12.0 | 
| children | 选项卡头显示内容 | ReactNode | - |  | 
| closable | 是否显示选项卡的关闭按钮，在  | boolean | true |  | 


### MoreProps

| 参数 | 说明 | 类型 | 默认值 | 版本 | 
|--------|--------|--------|--------|--------|
| icon | 自定义折叠图标 | ReactNode | - |  | 
|  |  |  |  |  | 
