ChatHeader (会话头部)

会话顶部栏:手机上的返回按钮、头像、标题,第二行在有人输入时变成「正在输入…」,右侧放操作按钮。

基础用法

Basic.vue

属性

属性类型默认值说明
avatarstring | nullnullAvatar URL, e.g. a group photo.
backboolean | "mobile""mobile"The back button: `mobile` below the `md` breakpoint only.
kindKunChatKind"direct"A direct chat says "typing…"; a group names who is typing.
subtitlestring""Second line, e.g. a member count. Replaced while someone types.
titlestring—Title. Defaults to `user`'s name.
typingKunChatTypingEvent[][]Typing notifications as received; while one is live it replaces the subtitle.
userKunChatUser | nullnullThe other person of a direct chat: title and avatar.
usersKunChatUser[][]Users, to name who is typing in a group.

事件

事件回调参数说明
back—The back button was clicked.
title-clickevent: MouseEventThe avatar or title was clicked, e.g. to open the profile or details.

插槽

插槽作用域说明
#actionsanyButtons on the right: search, call, a menu.
#subtitleanyReplaces the second line when nobody is typing.