导航菜单Menu


侧边导航菜单

系统层级简单但功能数量多时,可使用侧边导航菜单进行“左右布局”。竖向排列的形式可以展示更多的菜单项


顶部导航菜单

系统层级简单且功能数量少时,可使用顶部导航菜单进行“上下布局”。该整体视觉动线简单,适合信息展示类系统。

顶导菜单&侧导菜单

系统层级简单但功能数量多时,可使用侧边导航菜单进行“左右布局”。竖向排列的形式可以展示更多的菜单项。


Attributes


参数说明类型可选值默认值
logo-src产品Logostring--
title产品名称(必填)string--
mode纵向、横向或组合展示stringhorizontal: 横向;vertical: 竖向;combination:组合vertical
collapse是否开启折叠菜单功能boolean-false
filterable是否开启搜索菜单功能,仅支持侧边导航或组合导航boolean-false
menu-list侧边导航菜单对应数组展示数据array见示例-
menu-props侧边导航菜单数组对应的keyobject见下列'{ iconKey: 'menu_icon',valueKey: 'menu_code',labelKey: 'menu_name',childrenKey:'children' }'
popper-class自定义类名string--


参数说明类型可选值默认值
iconKey作为 icon 唯一标识的键名string--
valueKey作为 value 唯一标识的键名string--
labelKey作为 icon 唯一标识的键名string--
childrenKey作为 children 唯一标识的键名string--

Slots


插槽名说明
headerLeft顶栏容器左边部分,只对 mode="horizontal"或mode="combination" 有效
headerCenter顶栏容器中间部分,只对 mode="horizontal"或mode="combination" 有效
headerRight顶栏容器右边部分,只对 mode="horizontal"或mode="combination" 有效
asideHeader侧边栏容器内容上边部分,只对 mode="vertical" 有效
asideContent侧边栏容器内容中间部分,只对 mode="vertical"或mode="combination" 有效
asideFooter侧边栏容器内容下边部分,只对 mode="vertical"或mode="combination" 有效
asideFooterIcons侧边栏容器内容下边部分里面的icon,只对 mode="vertical"或mode="combination" 有效
main主要区域容器

Events


方法名说明回调参数
select菜单激活回调index: 选中菜单项的 index, indexPath: 选中菜单项的 index path, item: 选中菜单项, routeResult: vue-router 的返回值(如果 router 为 true)
opensub-menu 展开的回调index: 打开的 sub-menu 的 index, indexPath: 打开的 sub-menu 的 index path
closesub-menu 收起的回调index: 收起的 sub-menu 的 index, indexPath: 收起的 sub-menu 的 index path