ChatMessageMenu (消息菜单)

消息的右键 / 长按菜单:顶部一排快捷回应(可展开全部),下面是回复、引用、复制、编辑、置顶、删除、举报——哪些项出现由站点决定。

基础用法

快捷回应一排最多 7 个,更多的由右侧按钮展开成完整的选择器;↑↓ 在操作之间移动,←→ 在回应之间移动, Tab 在两组之间切换,Esc 关闭。

雪之下小春:
周末的线下聚会你去吗?
右键点击上面的消息
Basic.vue

属性

属性类型默认值说明
visible *boolean—Whether the menu is open. It asks to close — Escape, a click outside, the page scrolling, a choice made — by emitting `close`.
actionsKunChatMessageAction[]["reply", "copy"]The actions, in order: built-in keys, or items of your own.
currentReactionstring | nullnullThe viewer's current reaction on the message, highlighted.
position{ x: number; y: number; } | null{ x: 0, y: 0 }Viewport point to open at — the cursor, or the long-press point.
quickReactionsnumber7How many reactions the row shows before the expand button.
reactionsKunChatReactionOption[][]The quick-reaction row on top; empty hides it.

事件

事件回调参数说明
close—The menu closed, for any reason.
reactreaction: string | nullA reaction was chosen: its key, or null when the current one was chosen again.
selectaction: stringAn action was chosen: a built-in key or one of your own items' keys.