论el-menu自定义样式

最终效果:

原始效果:

相关代码:

<!-- 菜单 -->
          <div class="button-manage-right">
            <el-menu
              :default-active="activeIndex"
              class="el-menu-demo"
              mode="horizontal"
              @select="handleSelect"
            >
              <el-menu-item
                v-for="item in currentCommandInfo.functionArr"
                :key="item.functionId"
                :index="item.functionId"
                >{
  { item.functionName }}</el-menu-item
              >
            </el-menu>
          </div>
<style lang="less" scoped>
// 修改菜单的样式
.button-manage-right {
  & ::v-deep .el-menu {
    background-color: transparent;
  }
  & ::v-deep .el-menu.el-menu--horizontal {
    height: 100%;
    border-bottom: none;
  }
  & ::v-deep .el-menu--horizontal > .el-menu-item {
    height: 100%;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  & ::v-deep .el-menu--horizontal > .el-menu-item:hover {
    background-color: #2c3c7a;
    border-bottom-color: #2c3c7a;
  }
  & ::v-deep .el-menu--horizontal > .el-menu-item.is-active {
    background-color: #2c3c7a;
    border-bottom-color: #2c3c7a;
  }
}
</style>

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-07 02:32:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-07 02:32:03       101 阅读
  3. 在Django里面运行非项目文件

    2024-01-07 02:32:03       82 阅读
  4. Python语言-面向对象

    2024-01-07 02:32:03       91 阅读

热门阅读

  1. 嵌入式Linux之Ubuntu学习笔记(文件系统结构)

    2024-01-07 02:32:03       51 阅读
  2. k8s之pod

    k8s之pod

    2024-01-07 02:32:03      43 阅读
  3. 编程笔记 html5&css&js 020 HTML URL

    2024-01-07 02:32:03       58 阅读
  4. Web网页开发-CSS层叠样式表1-笔记

    2024-01-07 02:32:03       53 阅读
  5. JVM虚拟机内存区域详情

    2024-01-07 02:32:03       48 阅读
  6. 医院信息系统集成平台—安全保障体系

    2024-01-07 02:32:03       55 阅读
  7. Centos的网络配置

    2024-01-07 02:32:03       54 阅读
  8. day07、SQL语言之复杂查询与视图

    2024-01-07 02:32:03       59 阅读
  9. 大数据开发-某外包公司

    2024-01-07 02:32:03       54 阅读
  10. 动态内存管理:malloc free

    2024-01-07 02:32:03       52 阅读
  11. LeetCode //C - 394. Decode String

    2024-01-07 02:32:03       53 阅读
  12. vue3中的watch

    2024-01-07 02:32:03       58 阅读