跳转到内容
搜索文档

rtk-chat-composer-view

最后更新 查看 MarkdownAgent 设置

用于渲染聊天编辑器的组件。

属性

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

使用示例

基本用法

<rtk-chat-composer-view></rtk-chat-composer-view>

带属性用法

<rtk-chat-composer-view
 inputTextPlaceholder="example">
</rtk-chat-composer-view>
<script>
  const el = document.querySelector("rtk-chat-composer-view");

  el.canSendFiles= true;
  el.canSendTextMessage= true;
</script>

这篇文档对您有帮助吗?