Skip to content

Dropdown 下拉菜单 ​

悬停/点击触发的菜单,支持命令回调。

基础用法 ​

vue
<template>
  <KbDropdown :items="[{ label: '编辑', command: 'edit' }]"><KbButton>更多</KbButton></KbDropdown>
</template>

API ​

Props ​

属性类型默认值说明
itemsDropdownItem[][]菜单项(label/command/divider/danger)
trigger'hover' | 'click''hover'触发方式

事件 ​

事件参数说明
commandstring点击菜单项

插槽 ​

名称说明
default触发元素