Skip to content

Conversation

@FlowerBlackG
Copy link
Contributor

@FlowerBlackG FlowerBlackG commented Sep 28, 2025

…n icon for popcontent is null

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

无。

💡 需求背景和解决方案

使用 且设置 icon 为 null 时,组件仍会渲染一个图标。这和 confirmBtn, cancelBtn 等其他 prop 的逻辑不一致。

📝 更新日志

  • fix(Popconfirm): 修复 icon={null} 时,仍会显示默认图标的问题

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 28, 2025

tdesign-react-demo

npm i https://pkg.pr.new/tdesign-react@3850

commit: 53c18ec

@github-actions
Copy link
Contributor

完成

@RylanBot RylanBot changed the title fix(popcontent): fixes an issue that default icon still displayed whe… fix(Popconfirm): fixes an issue that default icon still displayed whe… Sep 28, 2025
@RylanBot
Copy link
Collaborator

RylanBot commented Sep 28, 2025

不渲染 icon 可以直接传入 <></> 🤔
这个问题感觉是目前 TNode 类型进行渲染的时候没有统一
许多组件,例如 TreeSelectempty 也支持 TNode, 但它想要隐藏,null 也是不生效的,只能 <></>
包括有些 TNode 甚至支持传入 false 就隐藏 (?)
所以感觉这个需要讨论后,再决定是否改
React 端未来应该会参考 Vue Next 的 useContent 进行统一适配自定义节点的渲染

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants