@deprecated rtk-chat-message 已弃用,即将删除。请改用 rtk-message-view。
| 属性 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
alignRight |
boolean |
✅ | - | 将消息靠右对齐 |
canDelete |
boolean |
✅ | - | 是否可以删除消息 |
canEdit |
boolean |
✅ | - | 是否可以编辑消息 |
canPin |
boolean |
✅ | - | 是否可以置顶此消息 |
canReply |
boolean |
✅ | - | 是否可以引用回复此消息 |
child |
HTMLElement |
✅ | - | 子元素 |
disableControls |
boolean |
✅ | - | 禁用控件 |
hideAvatar |
boolean |
✅ | - | 隐藏头像 |
iconPack |
IconPack1 |
❌ | defaultIconPack |
图标包 |
isContinued |
boolean |
✅ | - | 是否为连续消息 |
isSelf |
boolean |
✅ | - | 发送者是否为自己 |
isUnread |
boolean |
✅ | - | 是否未读 |
leftAlign |
boolean |
✅ | - | 是否将聊天气泡靠左对齐 |
message |
Message |
✅ | - | 消息条目 |
senderDisplayPicture |
string |
✅ | - | 发送者头像 URL |
size |
Size |
✅ | - | 尺寸 |
t |
RtkI18n1 |
❌ | useLanguage() |
语言 |
<rtk-chat-message></rtk-chat-message><rtk-chat-message>
</rtk-chat-message><script>
const el = document.querySelector("rtk-chat-message");
el.alignRight= true;
el.canDelete= true;
el.canEdit= true;
</script>