API 浏览器
聊天消息

Quasar 提供了一个名为 QChatMessage 的聊天组件,它实际上是一个聊天条目,用于渲染由 props 提供的数据。

¥Quasar supplies a chat component called QChatMessage which is really a chat entry that renders the data given by the props.

提示

要在同一个线程中混合使用带头像和不带头像的消息,请使用占位符头像图片。

¥To mix messages with avatar and without avatar in the same thread, use a placeholder avatar image.

Loading QChatMessage API...

用法(Usage)

¥Usage

基础知识(The basics)

¥The basics

提示

sent 属性适用于聊天消息的发送者。另一侧用于接收消息。

¥Using the property sent is intended for the sender of the chat message. The other side is for received messages.

Basic



Name



Avatar



Stamp



Label



自定义(Customization)

¥Customization

Text and background color



Size



插槽(Slots)

¥Slots

Default slot



Avatar/Stamp/Name slots



清理(Sanitization)

¥Sanitization

警告

如果你不信任来源(如果值来自用户输入),请始终对值进行清理。

¥Always sanitize values if you do not trust the origin (if the value comes from user input).

Sanitized content