<el-menu>

1、router属性,若使用router属性menu-item的index将对应router的path属性

2、mode,下拉菜单的模式分为horizontal和vertical两种模式

3、background-color,background-color属性为下拉菜单整体的背景颜色

4、text-color,text-color为下拉菜单中的文字的颜色

5、active-text-color为选中的菜单的颜色

<el-menu>标签中可以有el-submenu和el-menu-item标签组成

demo

<el-menu :router="true" mode="horizontal" background-color="#1c213f" text-color="#fff">
<el-submenu index="1">
<template slot="title">
<i class="el-icon-menu"></i>
</template>
<el-menu-item index="1-1">选项一</el-menu-item>
<el-submenu index="2">
<template slot="title">选项二</template>
<el-menu-item index="2-1">选项二-一</el-menu-item>
</el-submenu>
</el-menu>
参数 说明 类型 可选值 默认值
mode 模式 string horizontal / vertical vertical
collapse 是否水平折叠收起菜单(仅在 mode 为 vertical 时可用) boolean false
background-color 菜单的背景色(仅支持 hex 格式) string #ffffff
text-color 菜单的文字颜色(仅支持 hex 格式) string #303133
active-text-color 当前激活菜单的文字颜色(仅支持 hex 格式) string #409EFF
default-active 当前激活菜单的 index string
default-openeds 当前打开的 sub-menu 的 index 的数组 Array
unique-opened 是否只保持一个子菜单的展开 boolean false
menu-trigger 子菜单打开的触发方式(只在 mode 为 horizontal 时有效) string hover / click hover
router 是否使用 vue-router 的模式,启用该模式会在激活导航时以 index 作为 path 进行路由跳转 boolean false
collapse-transition 是否开启折叠动画 boolean true
 
 

最新文章

  1. 第三章 --- 关于Javascript 设计模式 之 代理模式
  2. TCP学习之五:客户端、服务端异步传输字符串
  3. python 数据处理学习pandas之DataFrame
  4. elk系列8之logstash+redis+es的架构来收集apache的日志
  5. BackgroundWorker组件的作用
  6. netty发送utf-8编码的信息
  7. 一次zabbix的渗透
  8. ASP.NET MVC3 使用kindeditor编辑器获取不到值
  9. javascript笔记——图片大小检测
  10. 我摘录的js代码
  11. 【宽搜】Vijos P1206 CoVH之再破难关
  12. C语言指针和数组知识总结(下)
  13. COGS 1299. bplusa【听说比a+b还要水的大水题???】
  14. 电脑小白和ta的小白电脑——PowerDesigner的安装与破解
  15. mac date命令详解
  16. Fabric实例
  17. JSTL中forEach标签应用示例【转】【补】
  18. lower_case_table_names
  19. 初学者必读:IBM长文解读人工智能、机器学习和认知计算
  20. 并查集(Union-Find) 应用举例 --- 基础篇

热门文章

  1. C# App.config 自定义 配置节
  2. windows下 文件资源管理器 的操作
  3. Python中文件读写之 w+ 与 r+ 到底有啥区别?
  4. Github 上 Star 最多的个人 Spring Boot 开源学习项目(三)
  5. C语言第十一周作业
  6. JAVA第四周总结与实验2
  7. 基于opencv简单的图片截取
  8. urllib库认证,代理,cookie
  9. (4.25)Sqlserver中 登录用户只能看到自己拥有权限的库
  10. zookeeper 分布式协调服务