前端学习笔记element-Plus

【element-plus菜单】参数说明:

active-text-color="#ffd04b"------激活颜色

background-color="#232323"------背景颜色(29,160,176)
:default-active ="$route.path"------配置默认高亮的菜单项

text-color="#fff"
router router选项开启,el-menu-item 的 index 就是点击跳转的路径

el-menu-item 菜单项

index="/article/channel" 配置的是访问的跳转路径,配合default-active的值,实现高亮

Element PLus官方网址:Container 布局容器 | Element Plus

Element PLus官方网址:Menu 菜单 | Element Plus (element-plus.org)

导航菜单默认为垂直模式,通过将 mode 属性设置为 horizontal 来使导航菜单变更为水平模式。

复制代码
 <el-menu
          active-text-color="#ffd04b"
          background-color="#232323"
          :default-active="$route.path"
          text-color="#fff"
          router
        >
          <el-menu-item index="/article/channel">
            <el-icon><Management /></el-icon>
            <span>文章分类</span>
          </el-menu-item>
          <el-menu-item index="/article/manage">
            <el-icon><Promotion /></el-icon>
            <span>文章管理</span>
          </el-menu-item>

          <el-sub-menu index="/user">
            <!-- 多级菜单的标题 - 具名插槽 title -->
            <template #title>
              <el-icon><UserFilled /></el-icon>
              <span>个人中心</span>
            </template>

            <!-- 展开的内容 - 默认插槽 -->
            <el-menu-item index="/user/profile">
              <el-icon><User /></el-icon>
              <span>基本资料</span>
            </el-menu-item>
            <el-menu-item index="/user/avatar">
              <el-icon><Crop /></el-icon>
              <span>更换头像</span>
            </el-menu-item>
            <el-menu-item index="/user/password">
              <el-icon><EditPen /></el-icon>
              <span>重置密码</span>
            </el-menu-item>
          </el-sub-menu>
        </el-menu>
相关推荐
cll_8692418916 分钟前
一个好看的Wordpress博客文字css样式
前端·css·ui
糖果店的幽灵10 分钟前
langgraph分支之 - 动态分支(Dynamic Branch)
java·前端·javascript·人工智能·langgraph
whyTeaFo11 分钟前
GAMES101: Lecture 10: Geometry 1 (Introduction) ppt笔记
笔记
meilindehuzi_a20 分钟前
Workflow 与 Agent 有什么区别:从 LangChain 流水线到智能体决策
前端·人工智能
Bad_Shepherd26 分钟前
vue-element-plus-admin添加自定义svg图标,并且图标选择组件可选自定义图标
vue.js·elementui·前端框架
sulikey1 小时前
个人Linux操作系统学习笔记11 - 环境变量
linux·笔记·学习
吃糖的小孩2 小时前
从只读页面到可控真实探针:我如何给 Owner Console 加手动诊断
前端
谷无姜2 小时前
为什么你的性能优化无效?可能是"木桶效应"在作祟
前端·性能优化
治愈系贝壳2 小时前
ARM --- day 6 时钟
linux·arm开发·学习
雾非雾2 小时前
《基于具身交互智能数字人技术:如何打造AI数字人宣讲平台"红厅智播”》
前端