当前位置:   article > 正文

第73左侧菜单实现

第73左侧菜单实现

layout下面新建menu

在这里插入图片描述

layout index.vue导入menu

import Menu from '@/views/layout/menu'
  • 1

在这里插入图片描述
菜单实现:

<template>
  <el-menu
      active-text-color="#ffd04b"
      background-color="#2d3a4b"
      class="el-menu-vertical-demo"
      default-active="home"
      text-color="#fff"
      router
  >
    <el-menu-item index="home">
      <el-icon><home-filled /></el-icon>
      <span>首页</span>
    </el-menu-item>

    <el-menu-item index="user">
      <el-icon><user /></el-icon>
      <span>用户管理</span>
    </el-menu-item>

    <el-sub-menu index="3">
      <template #title >
        <el-icon><management /></el-icon>
        <span>商品类别管理</span>
      </template>
      <el-menu-item index="bigType">
        <el-icon><management /></el-icon>
        <span>商品大类管理</span>
      </el-menu-item>
      <el-menu-item index="smallType">
        <el-icon><management /></el-icon>
        <span>商品小类管理</span>
      </el-menu-item>
    </el-sub-menu>

    <el-menu-item index="product">
      <el-icon><tickets /></el-icon>
      <span>商品管理</span>
    </el-menu-item>

    <el-menu-item index="order">
      <el-icon><tickets /></el-icon>
      <span>订单管理</span>
    </el-menu-item>

    <el-sub-menu index="11">
      <template #title >
        <el-icon><management /></el-icon>
        <span>系统管理</span>
      </template>
      <el-menu-item index="modifyPassword">
        <el-icon><edit /></el-icon>
        <span>修改密码</span>
      </el-menu-item>
      <el-menu-item >
        <el-icon @click="logout"><switch-button /></el-icon>
        <span @click="logout">安全退出</span>
      </el-menu-item>
    </el-sub-menu>
  </el-menu>
</template>

<script setup>
import {HomeFilled,User,Tickets,Goods,DocumentAdd,Management,Setting,Edit,SwitchButton} from '@element-plus/icons-vue'

</script>

<style lang="scss" scoped>

</style>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69

layout修改:

<template>
  <div class="app-wrapper">
    <el-container>
      <el-aside width="200px" class="sidebar-container"><Menu/></el-aside>
      <el-container>
        <el-header>Header</el-header>
        <el-main>Main</el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup>
import Menu from '@/views/layout/menu'
</script>

<style lang="scss" scoped>

.app-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.sidebar-container {
  background-color: #2d3a4b;
  height: 100%;
}

::v-deep .el-container{
  height: 100%;
}

</style>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/blog/article/detail/91838
推荐阅读

  • 需求各种科目鸟类信息介绍对两张鸟类图片进行判断,看AR分类结果是否正确对两段鸟类声音进行判断,看AR分类结果是否正确涉及到功能登录界面因为是在内网使用,也就不需要注册功能,所以有简单登陆即可。输入账号密码,需要和从后端获取到账号... [详细]

  • 性能测试的方法主要包括以下几种:负载测试(loadTesting),压力测试(StressTesting),配置测试(ConfigurationTesting),并发测试(ConcurrencyTesting),可靠性测试(Reliabil... [详细]

  • 这次的版本带来了数百个虚幻引擎4的更新,包括来自GitHub的社区成员们提交的145个改进!感谢所有为虚幻引擎4添砖加瓦贡献的人们:alk3ovation,Allegorithmic(Allegorithmic),AlwinTom(alwi... [详细]

  • vue动态添加表单Defineformfieldsonce,asschema,andrenderthemanywhere!一次将表单字段定义为架构,然后将其呈现在任何地方!Howmuchcodedoesittakeforyoutorende... [详细]

  • 数据文件可在github:http://github.com/aarshayj/Analytics_Vidhya/tree/master/Articles/Time_Series_Analysis中下载#1.导入包importpandasa... [详细]

  • https://developer.unity.cn/projects/6066fc8dedbc2a0020fef5d1_unityhub一直转圈打不开unityhub一直转圈打不开成功的操作卸载hub手动删除ProgramData和App... [详细]

  • 程序员专属情人节表白网站(html+css+js邀请函网站制作)❤精彩专栏推荐... [详细]

  • 比如,我的研究区位于沿海,nodata值比较多,于是想到使用一个规则的矩形矢量掩膜裁剪经MRT融合后的数据,使得图幅包含研究区,并且Nodata值较少】运行成功后,在路径(Matlab当前工作路径)下找到生成的txt文件,改成合适的后缀就可... [详细]

  • 这是总目录,该系列持续更新中。。。。。。。。Unity+ECS框架(EntityComponentSystem)学习(图文详细+源码)——总目录????总结欢迎大佬多多来给萌新指正,欢迎大家来共同探讨。如果各位看官觉得文章有点点帮助,跪求各... [详细]

  • 前言策略模式是平时Java开发中常用的一种,虽然已有很多讲解设计模式的文章,但是这里还是写篇文章来从自己理解的角度讲解一下。Java设计模式——策略前言策略模式是平时Java开发中常用的一种,虽然已有很多讲解设计模式的文章,但是这里还是写篇... [详细]

  • 相关标签
      

    闽ICP备14008679号