Skip to content
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

新组件建议:仿腾讯家t-chat组件的Terminal组件 #103

Open
sdlddr opened this issue Feb 28, 2025 · 0 comments
Open

新组件建议:仿腾讯家t-chat组件的Terminal组件 #103

sdlddr opened this issue Feb 28, 2025 · 0 comments

Comments

@sdlddr
Copy link

sdlddr commented Feb 28, 2025

即:输出打印聊天记录终端,输入框上方那一大块聊天过程结果展示。
参照对象:腾讯家tdesign chat for ai系列中,t-chat组件。
https://tdesign.tencent.com/chat/components/chat
特点:
1、底部始终有清除历史记录功能。
2、提供滚动到底部的方法调用。
3、支持slot,自定义绑定dataList功能(我们可只考虑使用slot以增加灵活性、与其它子组件解耦)。
4、可选项:能支持按消息时间,自动插入时间分割线,且分割线能根据聊天上下文的时间及当前时间对比,自动判断自己要如何显示时间截(如昨天几点、一周前,3小时前、yyyy-mm-dd hh:mm:ss ……)
5、默认flex倒序排列,数据载入时直接从unshit顶部插入,有新消息时自动滚动到底部。
6、支持虚拟滚动,对超长的对话历史,只显示可视区及前后一段内的记录,以保证dom元素数量不占太多内存。
7、为什么不用Bubble-list? Bubble-list不包括欢迎语和提示框,这两个组件会在对话开始后消失,无法再调回显示。且Bubble-list不能涵盖所有用户自定义的气泡组件应用;需要同时出现的自定义气泡花样变多时,Bubble-list就比较笨绌了。

@sdlddr sdlddr changed the title 新组件建议:仿腾讯家t-chat组件和Terminal组件 新组件建议:仿腾讯家t-chat组件的Terminal组件 Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants