Skip to content

ConversationItem 会话列表 ​

基础用法 ​

插槽 ​

分组与吸顶 ​

Props ​

属性名说明类型默认值
items会话列表数据ConversationItem[][]
keyName指定 items 中作为唯一标识的字段名string'key'
activeKey / v-model:activeKey当前激活项的 key 值string''
sticky是否开启分组标题吸顶booleanfalse
theme主题模式'dark' | 'light'—

Events ​

事件名说明回调参数
update:activeKey激活项变化时触发,用于 v-model:activeKey 双向绑定(value: string)
activeChange点击切换激活项时触发(value: string, item: ConversationItem)

Slots ​

插槽名说明插槽参数
item自定义每个会话条目的内容{ item: ConversationItem }
group自定义分组标题的内容{ groupName: string }

ConversationItem 数据结构 ​

字段名说明类型是否必填
key唯一标识,与 keyName 对应string否
label显示文本string否
group所属分组名称,相同值的条目会被归为一组string否
disabled是否禁用该条目boolean否
[key: string]支持任意扩展字段,可通过插槽访问any否