2017-10-17 16:36:12 +08:00
|
|
|
import { ElementUIComponent } from './component'
|
|
|
|
|
|
|
|
export type MenuDisplayMode = 'horizontal' | 'vertical'
|
|
|
|
export type MenuTheme = 'light' | 'dark'
|
|
|
|
|
|
|
|
/** Menu that provides navigation for your website */
|
|
|
|
export declare class ElMenu extends ElementUIComponent {
|
|
|
|
/** Menu display mode */
|
|
|
|
mode: MenuDisplayMode
|
|
|
|
|
2017-10-18 18:31:03 +08:00
|
|
|
/** Whether the menu is collapsed (available only in vertical mode) */
|
|
|
|
collapse: boolean
|
|
|
|
|
|
|
|
/** Background color of Menu (hex format) */
|
|
|
|
backgroundColor: string
|
|
|
|
|
|
|
|
/** Text color of Menu (hex format) */
|
|
|
|
textColor: string
|
|
|
|
|
|
|
|
/** Text color of currently active menu item (hex format) */
|
|
|
|
activeTextColor: string
|
2017-10-17 16:36:12 +08:00
|
|
|
|
|
|
|
/** Index of currently active menu */
|
|
|
|
defaultActive: string
|
|
|
|
|
|
|
|
/** Array that contains keys of currently active sub-menus */
|
|
|
|
defaultOpeneds: string[]
|
|
|
|
|
|
|
|
/** Whether only one sub-menu can be active */
|
|
|
|
uniqueOpened: boolean
|
|
|
|
|
|
|
|
/** How sub-menus are triggered, only works when mode is 'horizontal' */
|
|
|
|
menuTrigger: string
|
|
|
|
|
|
|
|
/** Whether vue-router mode is activated. If true, index will be used as 'path' to activate the route action */
|
|
|
|
router: boolean
|
2018-03-16 11:21:35 +08:00
|
|
|
|
|
|
|
/** Whether the menu collapse transition is active */
|
|
|
|
collapseTransition: boolean
|
2018-03-19 17:27:40 +08:00
|
|
|
|
|
|
|
/** Open the specified sub-menu */
|
|
|
|
open (index: string): void
|
|
|
|
|
|
|
|
/** Close the specified sub-menu */
|
|
|
|
close (index: string): void
|
2017-10-17 16:36:12 +08:00
|
|
|
}
|