Toggleable menu for displaying lists of links and actions.
Menú conmutable para visualizar listas de enlaces y acciones.
### Basic usage
Hover on the dropdown menu to unfold it for more actions.
### Uso básico
Pase el ratón por el menú desplegable para desplegarlo y obtener más acciones.
:::demo The triggering element is rendered by the default `slot`, and the dropdown part is rendered by the `slot` named `dropdown`. By default, dropdown list shows when you hover on the triggering element without having to click it.
:::demo El elemento desencadenante se representa con el slot predeterminado, y la parte desplegable se representa con el slot llamado dropdown. Por defecto, la lista desplegable se muestra cuando se pasa el ratón por encima del elemento desencadenante sin necesidad de hacer clic en él.
```html
<el-dropdown>
...
...
@@ -86,11 +86,12 @@ Hover on the dropdown menu to unfold it for more actions.
:::
### Triggering element
Elemento detonante
Use the button to trigger the dropdown list.
Utilizando un botón para activar la lista desplegable.
:::demo Utilice `split-button` para dividir el elemento detonante en un grupo de botones, siendo el botón izquierdo un botón normal y el botón derecho el objetivo real de la detonacion. Si desea insertar una línea de separación entre la posición tres y la posición cuatro, sólo añada un divisor de clase a la posición cuatro.
:::demo Use `split-button` to split the triggering element into a button group with the left button being a normal button and right one the actual triggering target. If you wanna insert a separator line between item three and item four, just add a class `divider` to item four.
```html
<el-dropdown>
<el-buttontype="primary">
...
...
@@ -139,11 +140,11 @@ Use the button to trigger the dropdown list.
```
:::
### How to trigger
### Cómo detonar el evento
Click the triggering element or hover on it.
Haga clic en el elemento detonante o sobre él.
:::demo Use the attribute `trigger`. By default, it is `hover`.
:::demo Utilice el atributo `trigger`. Por defecto, es `hover`.
```html
<el-rowclass="block-col-2">
...
...
@@ -197,11 +198,12 @@ Click the triggering element or hover on it.
```
:::
### Menu hiding behavior
### Ocultamiento del menú
Use `hide-on-click` para definir si el menú se cierra al hacer clic.
Use `hide-on-click` to define if menu closes on clicking.
:::demo El menú predeterminado se cerrará cuando haga clic en los elementos del menú, y se puede desactivar configurando `hide-on-click` como false.
:::demo By default menu will close when you click on menu items, and it can be turned off by setting hide-on-click to false.
```html
<el-dropdown:hide-on-click="false">
<spanclass="el-dropdown-link">
...
...
@@ -228,9 +230,9 @@ Use `hide-on-click` to define if menu closes on clicking.
```
:::
### Command event
### Evento command
Clicking each dropdown item fires an event whose parameter is assigned by each item.
Al hacer clic en cada elemento desplegable se detona un evento cuyo parámetro es asignado por cada elemento.
:::demo
```html
...
...
@@ -269,11 +271,11 @@ Clicking each dropdown item fires an event whose parameter is assigned by each i
```
:::
### Sizes
### Tamaños
Besides default size, Dropdown component provides three additional sizes for you to choose among different scenarios.
Además del tamaño predeterminado, el componente Dropdown proporciona tres tamaños adicionales para que pueda elegir entre diferentes escenarios
:::demo Use attribute `size` to set additional sizes with `medium`, `small` or`mini`.
:::demo Utilice el atributo `size` para establecer tamaños adicionales con `medium`, `small` o`mini`.
```html
<el-dropdownsplit-buttontype="primary">
...
...
@@ -319,28 +321,28 @@ Besides default size, Dropdown component provides three additional sizes for you