SuperAPI AI 工具集

cometchat-angular-components

前端与建站

查看项目

更新于 10-16 05:03

技能介绍

用途:该技能是 CometChat Angular UI Kit v4 组件的权威参考,用于查找组件选择器、Angular 输入绑定、输出事件、ng-template 插槽、请求构建器和样式对象;不应臆造组件名或绑定。使用前需先读 cometchat-angular-core,模块导入、CUSTOM_ELEMENTS_SCHEMA 与初始化/登录是前置条件。

主要能力:涵盖复合组件(cometchat-conversations-with-messages、users-with-messages、groups-with-messages)、列表(conversations、users、groups、group-members)、消息(messages、message-header、message-list、message-composer)、通话(call-buttons、incoming-call、outgoing-call、ongoing-call、call-logs)、详情与群管理(details、contacts、add-members、banned-members、transfer-ownership、create-group)、线程(threaded-messages)以及 atoms(avatar、badge)。

必要用法:组件为独立组件,渲染为自定义 HTML 元素。绑定约定:数据用 [propName]="value",回调用 [onXxx]="handlerFn",字符串用 propName="string",插槽用 [slotName]="templateRef" 配合 <ng-template #ref>,样式用 [componentStyle]。on* 是 @Input() 回调,须用方括号,不能用圆括号事件。

适用场景:全页路由用复合组件;弹窗/侧边栏等窄容器用两栏布局;无收件箱的嵌入式聊天用细粒度组件。

限制:复合 3 面板布局需 ≥1024px 宽度,否则详情区留白;v4 无独立 cometchat-search,搜索通过列表 [hideSearch] 内置实现;部分输入名拼写特殊(auxilaryButtonView、onCloseClicked);通话组件需 @cometchat/calls-sdk-javascript;部分组件(NewChat、BlockedUsers 等)仅 React v6 有。其余细节暂未提供。