Skip to content

ConversationMenu 导航菜单

基础用法

插槽

Props

属性名说明类型默认值
items菜单数据列表ConversationMenu[][]
keyName指定 items 中作为唯一标识的字段名string'key'
activeKey / v-model:activeKey当前激活项的 key 值string''
openKeys / v-model:openKeys当前展开的子菜单 key 数组string[][]
theme主题模式'dark' | 'light'

Events

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

Slots

插槽名说明插槽参数
default自定义每个菜单项的内容,默认使用 TextOverflowTooltip 展示文本{ item: ConversationMenu }

ConversationMenu 数据结构

字段名说明类型是否必填
key唯一标识,与 keyName 对应string
label显示文本string
disabled是否禁用该项boolean
children子菜单列表,存在时该项作为折叠父节点ConversationMenu[]
[key: string]支持任意扩展字段,可通过插槽访问any