From 1180b611315dbc8be0ab0f8d41653ae23d3887ab Mon Sep 17 00:00:00 2001 From: Tianyuan Zhang Date: Thu, 21 Jul 2022 18:45:48 +0800 Subject: [PATCH] docs: tabpane add `disabled` (#36634) close #36610 --- components/tabs/index.en-US.md | 5 +++-- components/tabs/index.zh-CN.md | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/components/tabs/index.en-US.md b/components/tabs/index.en-US.md index 5628624210..6f4f4c3ace 100644 --- a/components/tabs/index.en-US.md +++ b/components/tabs/index.en-US.md @@ -21,7 +21,7 @@ Ant Design has 3 types of Tabs for different situations. ### Tabs | Property | Description | Type | Default | Version | -| --- | --- | --- | --- | --- | +| --- | --- | --- | --- | --- | --- | | activeKey | Current TabPane's key | string | - | | | addIcon | Customize add icon | ReactNode | - | 4.4.0 | | animated | Whether to change tabs with animation. Only works while `tabPosition="top"` | boolean \| { inkBar: boolean, tabPane: boolean } | { inkBar: true, tabPane: false } | | @@ -35,7 +35,7 @@ Ant Design has 3 types of Tabs for different situations. | tabBarExtraContent | Extra content in tab bar | ReactNode \| {left?: ReactNode, right?: ReactNode} | - | object: 4.6.0 | | tabBarGutter | The gap between tabs | number | - | | | tabBarStyle | Tab bar style object | CSSProperties | - | | -| tabPosition | Position of tabs | `top` \| `right` \| `bottom` \| `left` | `top` | | +| tabPosition | Position of tabs | `top` \| `right` \| `bottom` \ | `left` | `top` | | | destroyInactiveTabPane | Whether destroy inactive TabPane when change tab | boolean | false | | | type | Basic style of tabs | `line` \| `card` \| `editable-card` | `line` | | | onChange | Callback executed when active tab is changed | function(activeKey) {} | - | | @@ -50,6 +50,7 @@ More option at [rc-tabs option](https://github.com/react-component/tabs#tabs) | Property | Description | Type | Default | | --- | --- | --- | --- | | closeIcon | Customize close icon in TabPane's head. Only works while `type="editable-card"` | ReactNode | - | +| disabled | Set TabPane disabled | boolean | false | | forceRender | Forced render of content in tabs, not lazy render after clicking on tabs | boolean | false | | key | TabPane's key | string | - | | tab | Show text in TabPane's head | ReactNode | - | diff --git a/components/tabs/index.zh-CN.md b/components/tabs/index.zh-CN.md index 043088dfc8..b20502a1ca 100644 --- a/components/tabs/index.zh-CN.md +++ b/components/tabs/index.zh-CN.md @@ -27,7 +27,7 @@ Ant Design 依次提供了三级选项卡,分别用于不同的场景。 | --- | --- | --- | --- | --- | | activeKey | 当前激活 tab 面板的 key | string | - | | | addIcon | 自定义添加按钮 | ReactNode | - | 4.4.0 | -| animated | 是否使用动画切换 Tabs, 仅生效于 `tabPosition="top"` | boolean \| { inkBar: boolean, tabPane: boolean } | { inkBar: true, tabPane: false } | | +| animated | 是否使用动画切换 Tabs, 仅生效于 `tabPosition="top"` | boolean\| { inkBar: boolean, tabPane: boolean } | { inkBar: true, tabPane: false } | | | centered | 标签居中展示 | boolean | false | 4.4.0 | | defaultActiveKey | 初始化选中面板的 key,如果没有设置 activeKey | string | `第一个面板` | | | hideAdd | 是否隐藏加号图标,在 `type="editable-card"` 时有效 | boolean | false | | @@ -46,11 +46,16 @@ Ant Design 依次提供了三级选项卡,分别用于不同的场景。 | onTabClick | tab 被点击的回调 | function(key: string, event: MouseEvent) | - | | | onTabScroll | tab 滚动时触发 | function({ direction: `left` \| `right` \| `top` \| `bottom` }) | - | 4.3.0 | +> 更多属性查看 [rc-tabs tabs](https://github.com/react-component/tabs#tabs) + ### Tabs.TabPane | 参数 | 说明 | 类型 | 默认值 | | ----------- | ----------------------------------------------- | --------- | ------ | | closeIcon | 自定义关闭图标,`在 type="editable-card"`时有效 | ReactNode | - | +| disabled | 禁用某一项 | boolean | false | | forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false | | key | 对应 activeKey | string | - | | tab | 选项卡头显示文字 | ReactNode | - | + +> 更多属性查看 [rc-tabs tabpane](https://github.com/react-component/tabs#tabpane)