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. |
| resolveMediaUrl | KunChatMediaUrlResolver | — | Turns a pinned photo's hash into a URL, for the thumbnail. |
| unpinnable | boolean | false | Show the × that emits `unpin`. |
事件
| 事件 | 回调参数 | 说明 |
|---|---|---|
| jump | seq: number | Scroll the conversation to this message (`scrollToSeq`). |
| unpin | seq: number | The × was clicked for the message shown. |
插槽
| 插槽 | 作用域 | 说明 |
|---|---|---|
| #actions | any | Extra buttons on the right, e.g. "all pinned messages". |