Skip to content

Conversation

@LeonardoSya
Copy link
Collaborator

@LeonardoSya LeonardoSya commented Nov 19, 2025

🤔 这个 PR 的性质是?

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

💡 需求背景和解决方案

支持通过 Props插槽(slot) 两种方式来实现输入框的自定义(原先仅支持slot),如:

Props 写法:直接将 React 元素作为 props 传递

<ChatSender
  innerHeader={<div>引用内容</div>}
  footerPrefix={<Space><Button>附件</Button></Space>}
  actions={<Button>发送</Button>}
/>

插槽写法:通过 slot 属性指定插入位置,兼容 Web Components 原生写法

<ChatSender>
  <div slot="inner-header">引用内容</div>
  <div slot="footer-prefix">...</div>
</ChatSender>
  • 本条 PR 不需要纳入 Changelog

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

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

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

@LeonardoSya LeonardoSya self-assigned this Nov 19, 2025
@LeonardoSya LeonardoSya added 💪🏻 enhancement New feature or request 💭 discussion we are discussing labels Nov 19, 2025
@LeonardoSya LeonardoSya requested review from LzhengH and removed request for HaixingOoO, NWYLZW, RylanBot, ZWkang, honkinglin and uyarn November 20, 2025 02:34
@LeonardoSya
Copy link
Collaborator Author

这个提交依赖 tdesign webc 的这个 pr:TDesignOteam/tdesign-web-components#322

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

Labels

💭 discussion we are discussing 💪🏻 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants