跳转到内容
搜索文档

rtk-message-view

最后更新 查看 MarkdownAgent 设置

属性

属性 类型 必填 默认值 描述
actions MessageAction[] - 要在菜单中显示的操作列表
authorName string - 作者显示标签
avatarUrl string - 头像图片 URL
hideAuthorName boolean - 隐藏作者显示标签
hideAvatar boolean - 隐藏头像
hideMetadata boolean - 隐藏元数据(时间)
iconPack IconPack1 defaultIconPack 图标包
isEdited boolean - 消息是否已被编辑
isSelf boolean - 消息是否由当前用户发送
messageType Message['type'] - 消息类型
pinned boolean - 消息是否已置顶
time Date - 发送消息的时间
variant 'plain' | 'bubble' - 外观
viewType 'incoming' | 'outgoing' - 渲染

使用示例

基本用法

<!-- component.html -->
<rtk-message-view></rtk-message-view>

使用属性

<!-- component.html -->
<rtk-message-view
 [actions]="[]"
 authorName="example"
 avatarUrl="example">
</rtk-message-view>

这篇文档对您有帮助吗?