Intro
The vertically displayed navigation bar is used to switch between different content areas.
Install
Register component globally via app.use, refer to Component Registration for more registration ways.
Usage
Basic Usage
Show Badge
Disabled
Change Event
API
| Attribute |
Description |
Type |
Default |
| v-model |
Index of chosen item |
number | string |
0 |
| Event |
Description |
Arguments |
| change |
Emitted when chosen item changed |
index: number |
| Attribute |
Description |
Type |
Default |
| title |
Content |
string |
'' |
| dot |
Whether to show red dot |
boolean |
false |
| badge |
Content of the badge |
number | string |
'' |
| disabled |
Whether to be disabled |
boolean |
false |
| url |
Link |
string |
- |
| to |
Target route of the link, same as to of vue-router |
string | object |
- |
| replace |
If true, the navigation will not leave a history record |
boolean |
false |
| Event |
Description |
Arguments |
| click |
Emitted when an item is clicked |
index: number |
| Name |
Description |
| title |
Custom item title |
Less Variables
How to use: Custom Theme.
| Name |
Default Value |
Description |
| @sidebar-width |
80px |
- |
| @sidebar-font-size |
@font-size-md |
- |
| @sidebar-line-height |
@line-height-md |
- |
| @sidebar-text-color |
@text-color |
- |
| @sidebar-disabled-text-color |
@gray-5 |
- |
| @sidebar-padding |
20px @padding-sm |
- |
| @sidebar-active-color |
@active-color |
- |
| @sidebar-background-color |
@background-color |
- |
| @sidebar-selected-font-weight |
@font-weight-bold |
- |
| @sidebar-selected-text-color |
@text-color |
- |
| @sidebar-selected-border-width |
4px |
- |
| @sidebar-selected-border-height |
16px |
- |
| @sidebar-selected-border-color |
@red |
- |
| @sidebar-selected-background-color |
@white |
- |