Skip to content

Dropdown 下拉菜单 ​

向下或向上弹出的操作命令列表,完整支持 ArrowUp / ArrowDown / Home / End 键盘导航、Esc 关闭并还原焦点以及原生 <hr> 分隔线。

基础用法 ​

vue
<template>
  <VbDropdown :options="options" @select="handleSelect">
    <VbButton>操作菜单</VbButton>
  </VbDropdown>
</template>

API ​

属性名说明类型默认值
options菜单项列表(支持 type: 'divider'、danger、disabled)DropdownOption[][]
trigger触发方式'click' | 'hover''click'
placement弹出位置'bottom-start' | 'bottom' | 'bottom-end' | 'top-start' | 'top-end''bottom-start'
disabled是否禁用booleanfalse
hideOnClick点击选项后自动收起booleantrue

基于 MIT 协议开源发布 · @vobo-design/ui v0.5.0