Skip to content

Dropdown Menu

A dropdown menu panel. Composed of three parts: the see-dropdown container, see-dropdown-item menu items, and see-dropdown-panel panels — linked by their name attribute.

Usage note: Inside the #panels slot, you must wrap each panel with see-dropdown-panel and bind its name to the corresponding see-dropdown-item. The component automatically shows the panel matching the currently active item.

Basic Usage

vue
<template>
  <see-dropdown>
    <template #menu>
      <see-dropdown-item name="sort" title="Sort" />
      <see-dropdown-item name="filter" title="Filter" />
    </template>
    <template #panels>
      <see-dropdown-panel name="sort">
        <view>Sort panel content</view>
      </see-dropdown-panel>
      <see-dropdown-panel name="filter">
        <view>Filter panel content</view>
      </see-dropdown-panel>
    </template>
  </see-dropdown>
</template>

Disabled Item

vue
<template>
  <see-dropdown>
    <template #menu>
      <see-dropdown-item name="enabled" title="Enabled" />
      <see-dropdown-item name="disabled" title="Disabled" :is-disabled="true" />
    </template>
    <template #panels>
      <see-dropdown-panel name="enabled">
        <view>Enabled panel content</view>
      </see-dropdown-panel>
    </template>
  </see-dropdown>
</template>

Without Overlay

vue
<template>
  <see-dropdown :is-overlay="false">
    <template #menu>
      <see-dropdown-item name="sort" title="Sort" />
    </template>
    <template #panels>
      <see-dropdown-panel name="sort">
        <view>Sort panel content</view>
      </see-dropdown-panel>
    </template>
  </see-dropdown>
</template>

Props (Dropdown)

PropertyTypeDefaultDescription
modelValueRecord<string, any>{}Current selected values
zIndexnumber100z-index
durationnumber200Animation duration (ms)
isOverlaybooleantrueWhether to show overlay
closeOnClickOverlaybooleantrueWhether to close on overlay click

Props (DropdownItem)

PropertyTypeDefaultDescription
namestring-Unique identifier (required), matches the name of a see-dropdown-panel
titlestring''Display title
menuType'single' | 'multiple' | 'cascade' | 'date' | 'custom''single'Menu type
optionsDropdownOption[][]Option list
isDisabledbooleanfalseWhether disabled
placeholderstring'Select'Placeholder text

Props (DropdownPanel)

PropertyTypeDefaultDescription
namestring-Unique identifier (required), matches the name of a see-dropdown-item

Events (Dropdown)

EventParametersDescription
onChangevalue, nameValue change
onOpennamePanel open
onClosenamePanel close

Expose (Dropdown)

MethodParametersDescription
opennameOpen specified panel
closenameClose specified panel
closeAll-Close all panels
reset-Reset all options

Slots

ComponentSlotDescription
see-dropdownmenuMenu bar (place see-dropdown-items here)
see-dropdownpanelsPanels container (place see-dropdown-panels here)
see-dropdown-paneldefaultContent of a single panel

Liao ICP No. 2025070134