ChatTyping (正在输入)
三点动画 +「某某 正在输入…」:站点把收到的 typing 事件原样交进来,组件负责 6 秒过期与多人合并,尊重 prefers-reduced-motion。
基础用法
群聊里显示名字(一人、两三人、「某某 等 N 人」),私聊只说「正在输入…」。 useKunChatTyping 是同一套逻辑的组合式,自定义的地方用得上。
Basic.vue
属性
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| events | KunChatTypingEvent[] | [] | Typing notifications as received, each stamped with the receiving client's `Date.now()`. Each lapses 6 s after it arrived. |
| kind | KunChatKind | "direct" | A direct chat says "typing…"; a group names who is typing. |
| showText | boolean | true | Show the sentence beside the dots. |
| users | KunChatUser[] | [] | Users, to name who is typing in a group. |