mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-05 20:58:22 +08:00
docs(components): [menu] More details about usage of default-active (#9030)
* Menu: more details about usage of default-active `default-active` is required to select an item on page load. If it isn't set, no item is selected when the page first opens. Added this caveat to `Menu Attributes` section. * chore: update Co-authored-by: RealityBoy <1923740402@qq.com>
This commit is contained in:
parent
637ef1e25f
commit
93631d841e
@ -47,20 +47,20 @@ menu/collapse
|
||||
|
||||
## Menu Attributes
|
||||
|
||||
| Attribute | Description | Type | Accepted Values | Default |
|
||||
| ------------------- | ---------------------------------------------------------------------------------------------------------- | ------- | --------------------- | -------- |
|
||||
| mode | menu display mode | string | horizontal / vertical | vertical |
|
||||
| collapse | whether the menu is collapsed (available only in vertical mode) | boolean | — | false |
|
||||
| ellipsis | whether the menu is ellipsis (available only in horizontal mode) | boolean | — | true |
|
||||
| background-color | background color of Menu (hex format) (deprecated, use `--bg-color` instead) | string | — | #ffffff |
|
||||
| text-color | text color of Menu (hex format) (deprecated, use `--text-color` instead) | string | — | #303133 |
|
||||
| active-text-color | text color of currently active menu item (hex format) (deprecated, use `--active-color` instead) | string | — | #409EFF |
|
||||
| default-active | index of currently active menu | string | — | — |
|
||||
| default-openeds | array that contains indexes of currently active sub-menus | Array | — | — |
|
||||
| unique-opened | whether only one sub-menu can be active | boolean | — | false |
|
||||
| menu-trigger | how sub-menus are triggered, only works when `mode` is 'horizontal' | string | hover / click | hover |
|
||||
| router | whether `vue-router` mode is activated. If true, index will be used as 'path' to activate the route action | boolean | — | false |
|
||||
| collapse-transition | whether to enable the collapse transition | boolean | — | true |
|
||||
| Attribute | Description | Type | Accepted Values | Default |
|
||||
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | --------------------- | -------- |
|
||||
| mode | menu display mode | string | horizontal / vertical | vertical |
|
||||
| collapse | whether the menu is collapsed (available only in vertical mode) | boolean | — | false |
|
||||
| ellipsis | whether the menu is ellipsis (available only in horizontal mode) | boolean | — | true |
|
||||
| background-color | background color of Menu (hex format) (deprecated, use `--bg-color` instead) | string | — | #ffffff |
|
||||
| text-color | text color of Menu (hex format) (deprecated, use `--text-color` instead) | string | — | #303133 |
|
||||
| active-text-color | text color of currently active menu item (hex format) (deprecated, use `--active-color` instead) | string | — | #409EFF |
|
||||
| default-active | index of active menu on page load | string | — | — |
|
||||
| default-openeds | array that contains indexes of currently active sub-menus | Array | — | — |
|
||||
| unique-opened | whether only one sub-menu can be active | boolean | — | false |
|
||||
| menu-trigger | how sub-menus are triggered, only works when `mode` is 'horizontal' | string | hover / click | hover |
|
||||
| router | whether `vue-router` mode is activated. If true, index will be used as 'path' to activate the route action. Use with `default-active` to set the active item on load. | boolean | — | false |
|
||||
| collapse-transition | whether to enable the collapse transition | boolean | — | true |
|
||||
|
||||
## Menu Methods
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user