-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Add closeIcon for Tabs.Tabpane #23992
fix: Add closeIcon for Tabs.Tabpane #23992
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 5cc29d2:
|
components/tabs/index.zh-CN.md
Outdated
@@ -49,3 +49,4 @@ Ant Design 依次提供了三级选项卡,分别用于不同的场景。 | |||
| forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false | | |||
| key | 对应 activeKey | string | 无 | | |||
| tab | 选项卡头显示文字 | string\|ReactNode | 无 | | |||
| closeIcon | 自定义关闭图标 | ReactNode | 无 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
声明一下只在 editable card 类型下生效。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
好的
components/tabs/index.zh-CN.md
Outdated
| forceRender | 被隐藏时是否渲染 DOM 结构 | boolean | false | | ||
| key | 对应 activeKey | string | 无 | | ||
| tab | 选项卡头显示文字 | string\|ReactNode | 无 | | ||
| closeIcon | 自定义关闭图标,在 type="editable-card" 时有效 | ReactNode | 无 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| closeIcon | 自定义关闭图标,在 type="editable-card" 时有效 | ReactNode | 无 | | |
| closeIcon | 自定义关闭图标,在 `type="editable-card"` 时有效 | ReactNode | 无 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果在一个Tabs
里面的多个TabPane
,需要固定几个TabPane
不允许被关闭,其他都是可以关闭的,即:Tabs->type="editable-card"
,但是这样 所有的TabPane
都可以出现关闭图标,可否在每个TabPane
中设置不现实关闭图标,类似closeIcon={null}
这样
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry,刚看到应该在新版本中支持了,<TabPane tab={pane.title} key={pane.key} closable={pane.closable}>
rebase master |
feature branch |
4c7f57d
to
4cb70b6
Compare
Commits should be clean. |
🤔 This is a ...
🔗 Related issue link
close #23958
💡 Background and solution
📝 Changelog
closeIcon
of TabpanecloseIcon
属性支持自定义关闭图标。☑️ Self Check before Merge
View rendered components/tabs/demo/editable-card.md
View rendered components/tabs/index.en-US.md
View rendered components/tabs/index.zh-CN.md