ChatPinnedBar (置顶条)

会话顶部的置顶消息条:多条时从最新的开始,点击跳到当前这条并切到上一条,左侧分段指示位置。

基础用法

把 @jump 接到 KunChatMessageList 的 scrollToSeq; 没载入的消息 scrollToSeq 返回 false,按 around_seq 取一页再跳。

jump → 点一下置顶条

Basic.vue

属性

属性类型默认值说明
messages *KunChatMessage[]—Pinned messages, in any order. The bar starts at the newest and each click moves to the next older one, as Telegram does.
resolveMediaUrlKunChatMediaUrlResolver—Turns a pinned photo's hash into a URL, for the thumbnail.
unpinnablebooleanfalseShow the × that emits `unpin`.

事件

事件回调参数说明
jumpseq: numberScroll the conversation to this message (`scrollToSeq`).
unpinseq: numberThe × was clicked for the message shown.

插槽

插槽作用域说明
#actionsanyExtra buttons on the right, e.g. "all pinned messages".