docs(Tabs): update docs about tabs closable prop (#42795)

* docs: update docs about tabs closable prop

* Update components/tabs/index.zh-CN.md

Co-authored-by: afc163 <afc163@gmail.com>

* Update components/tabs/index.zh-CN.md

Co-authored-by: afc163 <afc163@gmail.com>

---------

Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
kiner-tang(文辉) 2023-06-03 13:18:12 +08:00 committed by GitHub
parent 8e8433c426
commit 26ab02f38a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 8 deletions

View File

@ -72,6 +72,7 @@ More option at [rc-tabs tabs](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 | - |
| closable | Whether the Tab can be closed, Only works while `type="editable-card"` | boolean | true |
| 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 | - |

View File

@ -71,14 +71,15 @@ Ant Design 依次提供了三级选项卡,分别用于不同的场景。
### TabItemType
| 参数 | 说明 | 类型 | 默认值 |
| ----------- | ----------------------------------------------- | --------- | ------ |
| closeIcon | 自定义关闭图标,`在 type="editable-card"`时有效 | ReactNode | - |
| disabled | 禁用某一项 | boolean | false |
| forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false |
| key | 对应 activeKey | string | - |
| label | 选项卡头显示文字 | ReactNode | - |
| children | 选项卡头显示内容 | ReactNode | - |
| 参数 | 说明 | 类型 | 默认值 |
| ----------- | ------------------------------------------------------- | --------- | ------ |
| closeIcon | 自定义关闭图标,在 `type="editable-card"` 时有效 | ReactNode | - |
| closable | 当前选项卡是否可被关闭,在 `type="editable-card"` 时有效 | boolean | true |
| disabled | 禁用某一项 | boolean | false |
| forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false |
| key | 对应 activeKey | string | - |
| label | 选项卡头显示文字 | ReactNode | - |
| children | 选项卡头显示内容 | ReactNode | - |
## Design Token