跳转到内容
本站为社区维护的非官方中文翻译,与 Cloudflare, Inc. 无关联。本站不提供账户登录,请勿在任何非官方站点输入您的 Cloudflare 账户信息。官方文档:developers.cloudflare.com

rtk-chat-composer-view

最后更新 查看 MarkdownAgent 设置

渲染聊天编辑器的组件。

属性

属性 类型 是否必填 默认值 描述
canSendFiles boolean ✅ - 用户是否可以发送文件消息
canSendTextMessage boolean ✅ - 用户是否可以发送文本消息
iconPack IconPack1 ❌ defaultIconPack 图标包
inputTextPlaceholder string ✅ - 文本输入的占位符
isEditing boolean ✅ - 将编辑器设置为编辑模式
isSending boolean ✅ - 消息是否正在发送
maxLength number ✅ - 文本输入的最大长度
message string ✅ - 要预先填充的消息
quotedMessage string ✅ - 要显示的引用消息
rateLimits { period: number; maxInvocations: number; } ✅ - 频率限制
storageKey string ✅ - 在 localStorage 中存储消息的键
t RtkI18n1 ❌ useLanguage() 语言

使用示例

基本用法

<!-- component.html -->
<rtk-chat-composer-view></rtk-chat-composer-view>

带有属性

<!-- component.html -->
<rtk-chat-composer-view
 [canSendFiles]="true"
 [canSendTextMessage]="true"
 inputTextPlaceholder="example">
</rtk-chat-composer-view>

这篇文档对您有帮助吗?