diff --git a/docs/en-US/component/dropdown.md b/docs/en-US/component/dropdown.md index 7437f98206..eea6bc7947 100644 --- a/docs/en-US/component/dropdown.md +++ b/docs/en-US/component/dropdown.md @@ -83,65 +83,71 @@ dropdown/sizes ::: -## Dropdown Attributes +## Dropdown API -| Name | Description | Type | Accepted Values | Default | -| -------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------- | -------------------------------------------------------- | -------------------------------------------------------------------------- | -| type | menu button type, refer to `Button` Component, only works when `split-button` is true | string | — | — | -| size | menu size, also works on the split button | string | large / default / small | default | -| max-height | the max height of menu | string / number | — | — | -| split-button | whether a button group is displayed | boolean | — | false | -| disabled | Whether to disable | boolean | — | false | -| placement | placement of pop menu | string | top/top-start/top-end/bottom/bottom-start/bottom-end | bottom | -| trigger | how to trigger | string | hover/click/contextmenu | hover | -| hide-on-click | whether to hide menu after clicking menu-item | boolean | — | true | -| show-timeout | Delay time before show a dropdown (only works when trigger is `hover`) | number | — | 150 | -| hide-timeout | Delay time before hide a dropdown (only works when trigger is `hover`) | number | — | 150 | -| role | The ARIA role attribute for the dropdown menu. Depending on the use case, you may want to change this to 'navigation' | string | — | 'menu' | -| tabindex | [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of Dropdown | number | — | 0 | -| popper-class | custom class name for Dropdown's dropdown | string | — | — | -| popper-options | [popper.js](https://popper.js.org/docs/v2/) parameters | Object | refer to [popper.js](https://popper.js.org/docs/v2/) doc | `{modifiers: [{name: 'computeStyles',options: {gpuAcceleration: false}}]}` | -| teleported ^(2.2.20) | whether the dropdown popup is teleported to the body | boolean | — | true | +### Dropdown Attributes -## Dropdown Slots +| Name | Description | Type | Default | +| -------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| type | menu button type, refer to `Button` Component, only works when `split-button` is true | ^[enum]`'' \| 'default' \| 'primary' \| 'success' \| 'warning' \| 'info' \| 'danger' \| 'text'(delete)` | '' | +| size | menu size, also works on the split button | ^[enum]`'' \| 'large' \| 'default' \| 'small'` | '' | +| max-height | the max height of menu | ^[string] / ^[number] | '' | +| split-button | whether a button group is displayed | ^[boolean] | false | +| disabled | whether to disable | ^[boolean] | false | +| placement | placement of pop menu | ^[enum]`'top' \| 'top-start' \| 'top-end' \| 'bottom' \| 'bottom-start' \| 'bottom-end'` | bottom | +| trigger | how to trigger | ^[enum]`'hover' \| 'click' \| 'contextmenu'` | hover | +| hide-on-click | whether to hide menu after clicking menu-item | ^[boolean] | true | +| show-timeout | delay time before show a dropdown (only works when trigger is `hover`) | ^[number] | 150 | +| hide-timeout | delay time before hide a dropdown (only works when trigger is `hover`) | ^[number] | 150 | +| role | the ARIA role attribute for the dropdown menu. Depending on the use case, you may want to change this to 'navigation' | ^[string] | menu | +| tabindex | [tabindex](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex) of Dropdown | ^[number] / ^[string] | 0 | +| popper-class | custom class name for Dropdown's dropdown | ^[string] | '' | +| popper-options | [popper.js](https://popper.js.org/docs/v2/) parameters | ^[object] | `{modifiers: [{name: 'computeStyles',options: {gpuAcceleration: false}}]}` | +| teleported ^(2.2.20) | whether the dropdown popup is teleported to the body | ^[boolean] | true | + +### Dropdown Slots | Name | Description | Subtags | | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | -| — | content of Dropdown. Notice: Must be a valid html dom element (ex. `,