# Dropdown 下拉菜单

对 `antv` 的 dropdown 组件进行封装，扩展popconfirm按钮，全屏，自适应高度等功能。

## Usage

```vue
<template>
  <Dropdown
    placement="bottom"
    :trigger="['click']"
    :dropMenuList="dropdownList"
    :selectedKeys="selectedKeys"
    @menu-event="handleMenuEvent"
  >
    Dropdown
  </Dropdown>
</template>

<script lang="ts" setup>
  import { Dropdown, DropMenu } from '@eciol/ant-ui';
  const selectedKeys = ref([]);
  // locale list
  const dropdownList: DropMenu[] = [
    {
      text: '菜单1',
      event: 1,
    },
    {
      text: '菜单2',
      event: 2,
    },
  ];

  function handleClickMenu(menu: DropMenu) {
    const { event } = menu;
    console.log('menu: ', menu);
  }
</script>
```

## Props

::: tip 提示

**保持** [anv design popconfirm 组件](https://www.antdv.com/components/dropdown-cn/) **原有功能**的情况下扩展以下属性

:::

| 属性   | 类型      | 默认值 | 说明                                      |
| ------ | --------- | ------ | ----------------------------------------- |
| popconfirm | `boolean` | `false`   | 是否启用气泡确认框，为 false 则显示默认按钮 |
| trigger | `hover`, `click`, `contextmenu` | `contextmenu`   | 触发下拉的行为, 移动端不支持 hover |
| dropMenuList | `(DropMenu & Recordable<any>)[]` | `[]`   | 下拉列表，见下方 `DropMenu` 配置 |

## DropMenu

| 属性 | 类型 | 默认值 | 可选值 | 说明 |
| --- | --- | --- | --- | --- |
| to | `string` | - | - | - |
| icon | `string` | - | - | 图标名 |
| event | `string, number` | - | - | 事件key |
| text | `string` | - | - | 文本 |
| disabled | `boolean` | false | - | 是否禁用 |
| divider | `boolean` | false | - | 是否是分割线 |
