当前位置: 首页 > news >正文

vue2侧边导航栏路由

<template><div><!-- :default-active="$route.path" 和index对应其路径 --><el-menu:default-active="active"class="el-menu-vertical-demo"background-color="#545c64"text-color="#fff"active-text-color="#ffd04b"router:collapse="isCollapse"><el-menu-item><span slot="title">XX后台管理系统</span></el-menu-item><el-menu-item index="/"><i class="el-icon-menu"></i><span slot="title">首页</span></el-menu-item><el-submenu index="/product"><template slot="title"><i class="el-icon-location"></i><span>产品管理</span></template><el-menu-item-group><el-menu-item index="/product/list"><i class="el-icon-location"></i><span> 产品列表</span></el-menu-item><el-menu-item index="/product/category"><i class="el-icon-location"></i><span> 产品分类</span></el-menu-item></el-menu-item-group><el-submenu index="/product/purchase"><template slot="title">产品采购</template><el-menu-item index="/product/purchase/scheme">采购营销</el-menu-item></el-submenu></el-submenu><el-submenu index="/order"><template slot="title"><i class="el-icon-location"></i><span>订单管理</span></template><el-menu-item-group><el-menu-item index="/order/orderlist"><i class="el-icon-location"></i><span>订单列表</span></el-menu-item><el-menu-item index="/order/summary"><i class="el-icon-location"></i><span>汇总清单</span></el-menu-item><el-menu-item index="/order/review"><i class="el-icon-location"></i><span>订单审核</span></el-menu-item></el-menu-item-group></el-submenu><el-menu-item index="3" disabled><i class="el-icon-document"></i><span slot="title">广告分类</span></el-menu-item><el-submenu index="/system"><template slot="title"><i class="el-icon-location"></i><span>系统管理</span></template><el-menu-item-group><el-menu-item index="/system/adminstartion"><i class="el-icon-location"></i><span>系统列表</span></el-menu-item></el-menu-item-group><el-menu-item-group><el-menu-item index="/system/settings"><i class="el-icon-location"></i><span>系统设置</span></el-menu-item></el-menu-item-group></el-submenu></el-menu></div>
</template>
<script>export default {props:['isCollapse'],data(){return{// isCollapse:false}},methods:{handle(){console.log(11111)}},computed:{active(){return this.$route.path}}}
</script><style scoped lang="less">.el-menu-vertical-demo:not(.el-menu--collapse) {width: 200px;min-height: 400px;}/deep/.el-menu-item-group__title{padding: 0;}
</style>

总的vue中引入侧边栏的组件:

在这里插入图片描述

http://www.lryc.cn/news/487833.html

相关文章:

  • core 不可变类型 线程安全 record
  • linux之调度管理(8)-SMP cpu 的 psci启动
  • review-消息中间件MQ
  • leetcode400第N位数字
  • 前端网页开发学习(HTML+CSS+JS)有这一篇就够!
  • CSS遮罩:mask
  • Swift闭包的本质
  • 时代变迁对传统机器人等方向课程的巨大撕裂
  • 【算法设计与分析实训】第1关:求序列的最大字段和
  • 【澜舟科技-注册/登录安全分析报告】
  • 【读书笔记-《网络是怎样连接的》- 7】Chapter3_2 路由器
  • Android Activity 基础接口知识和常见问题
  • 利用python 检测当前目录下的所有PDF 并转化为png 格式
  • 解决 Spring Boot 中 `Ambiguous mapping. Cannot map ‘xxxController‘ method` 错误
  • C++ 函数返回值优化
  • c++源码阅读__ThreadPool__正文阅读
  • 关于ES的查询
  • 数据结构初识
  • 保存数据到Oracle时报错ORA-17004: 列类型无效: 1111
  • Excel——宏教程(1)
  • 论文浅尝 | MindMap:知识图谱提示激发大型语言模型中的思维图(ACL2024)
  • 第6章:TDengine 标签索引和删除数据
  • 【微软:多模态基础模型】(5)多模态大模型:通过LLM训练
  • 海外带云仓多语言商城源码,多语言多商家云仓一键代发商城
  • android:taskAffinity 对Activity退出时跳转的影响
  • Apache Dolphinscheduler数据质量源码分析
  • solana链上智能合约开发案例一则
  • 使用 PyTorch 实现 ZFNet 进行 MNIST 图像分类
  • 车轮上的科技:Spring Boot汽车新闻集散地
  • IDEA2023 SpringBoot整合Web开发(二)