mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-17 11:49:41 +08:00
2 lines
152 KiB
JavaScript
2 lines
152 KiB
JavaScript
|
import{_ as c,a as l,b as u,c as F,d as i,e as D,f as k}from"./chunks/triggering-element.145350f9.js";import{c as d,a as s,w as o,u as e,b as n,d as a,e as r,r as E,o as g}from"./app.fbbef7af.js";const A=n("h1",{id:"dropdown",tabindex:"-1"},[a("Dropdown "),n("a",{class:"header-anchor",href:"#dropdown","aria-hidden":"true"},"#")],-1),m=n("p",null,"Toggleable menu for displaying lists of links and actions.",-1),w=n("h2",{id:"basic-usage",tabindex:"-1"},[a("Basic usage "),n("a",{class:"header-anchor",href:"#basic-usage","aria-hidden":"true"},"#")],-1),B=n("p",null,"Hover on the dropdown menu to unfold it for more actions.",-1),h=n("p",null,"dropdown/basic-usage",-1),v=n("h2",{id:"triggering-element",tabindex:"-1"},[a("Triggering element "),n("a",{class:"header-anchor",href:"#triggering-element","aria-hidden":"true"},"#")],-1),b=n("p",null,"Use the button to trigger the dropdown list.",-1),y=n("p",null,"dropdown/triggering-element",-1),f=n("h2",{id:"how-to-trigger",tabindex:"-1"},[a("How to trigger "),n("a",{class:"header-anchor",href:"#how-to-trigger","aria-hidden":"true"},"#")],-1),_=n("p",null,"Click the triggering element or hover on it.",-1),x=n("p",null,"dropdown/how-to-trigger",-1),q=n("h2",{id:"menu-hiding-behavior",tabindex:"-1"},[a("Menu hiding behavior "),n("a",{class:"header-anchor",href:"#menu-hiding-behavior","aria-hidden":"true"},"#")],-1),P=n("p",null,[a("Use "),n("code",null,"hide-on-click"),a(" to define if menu closes on clicking.")],-1),L=n("p",null,"dropdown/menu-hiding-behavior",-1),z=n("h2",{id:"command-event",tabindex:"-1"},[a("Command event "),n("a",{class:"header-anchor",href:"#command-event","aria-hidden":"true"},"#")],-1),S=n("p",null,"Clicking each dropdown item fires an event whose parameter is assigned by each item.",-1),j=n("p",null,"dropdown/command-event",-1),M=n("h2",{id:"dropdown-methods",tabindex:"-1"},[a("Dropdown methods "),n("a",{class:"header-anchor",href:"#dropdown-methods","aria-hidden":"true"},"#")],-1),T=n("p",null,[a("You can open or close the dropdown menu by manually use "),n("code",null,"handleOpen"),a(" or "),n("code",null,"handleClose")],-1),V=n("p",null,"dropdown/dropdown-methods",-1),N=n("h2",{id:"sizes",tabindex:"-1"},[a("Sizes "),n("a",{class:"header-anchor",href:"#sizes","aria-hidden":"true"},"#")],-1),U=n("p",null,"Besides default size, Dropdown component provides three additional sizes for you to choose among different scenarios.",-1),I=n("p",null,"dropdown/sizes",-1),O=r('<h2 id="dropdown-attributes" tabindex="-1">Dropdown Attributes <a class="header-anchor" href="#dropdown-attributes" aria-hidden="true">#</a></h2><table><thead><tr><th>Attribute</th><th>Description</th><th>Type</th><th>Accepted Values</th><th>Default</th></tr></thead><tbody><tr><td>type</td><td>menu button type, refer to <code>Button</code> Component, only works when <code>split-button</code> is true</td><td>string</td><td>\u2014</td><td>\u2014</td></tr><tr><td>size</td><td>menu size, also works on the split button</td><td>string</td><td>large / default / small</td><td>default</td></tr><tr><td>max-height</td><td>the max height of menu</td><td>string / number</td><td>\u2014</td><td>\u2014</td></tr><tr><td>split-button</td><td>whether a button group is displayed</td><td>boolean</td><td>\u2014</td><td>false</td></tr><tr><td>disabled</td><td>Whether to disable</td><td>boolean</td><td>\u2014</td><td>false</td></tr><tr><td>placement</td><td>placement of pop menu</td><td>string</td><td>top/top-start/top-end/bottom/bottom-start/bottom-end</td><td>bottom</td></tr><tr><td>trigger</td><td>how to trigger</td><td>string</td><td>hover/click/contextmenu</td><td>hover</td></tr><tr><td>hide-on-click</td><td>whether to hide menu after clicking menu-item</td><td>boolean</td><td>\u2014</td><td>true</td></tr><tr><td>show-timeout</td><td>Delay time before show a dropdown (only works when trigger is <code>hover</code>)</td><td>number</td><td>\u2014</td><td>250</td></tr><tr><td>hide-timeout</td><td>Delay time before hide a dropdown (only works when trigger is <code>hover</code>)</td><td>number</td><td>\u2014</td><td>150</t
|