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

rtk-chat-selector-ui

最后更新 查看 MarkdownAgent 设置

属性

属性 类型 必填 默认值 描述
groups ChatGroup[] ✅ - 参与者
iconPack IconPack1 ❌ defaultIconPack 图标包
selectedGroupId string ✅ - 已选中的参与者
selfUserId string ✅ - 当前用户 ID
t RtkI18n ❌ useLanguage() 语言
unreadCounts Record<string, number> ✅ - 未读数量

使用示例

基本用法

<rtk-chat-selector-ui></rtk-chat-selector-ui>

带属性用法

<rtk-chat-selector-ui
 selectedGroupId="example"
 selfUserId="example"
 unreadCounts="example">
</rtk-chat-selector-ui>
<script>
  const el = document.querySelector("rtk-chat-selector-ui");

  el.groups = [];
  el.unreadCounts = 42;
</script>

这篇文档对您有帮助吗?