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

一个菜单两个二级路由的搭建

效果如下,而且这是最上方的菜单,需要进入以后重定向。

  {
    path: '/',
    name: 'HOME',
    component: ConsoleLayout, //这里也有router-view
    meta: {
      menu: false
    },
    redirect: {
      name: 'ManagerList'
    },
    children: [
      {
        path: '/rightsManage',
        name: 'RightsManage',
        component: () => import('@/views/AdminConsole/rightsManage/index.vue'),
        meta: {
          menu: true,
          title: '权限管理'
        },
        children: [
              {
              path: '/managerList',
              name: 'ManagerList',
              component: () => import('@/views/AdminConsole/rightsManage/manager.vue'),
              meta:
               {
                menu: true,
                title: '管理员列表'
               }
              },
              {
                path: '/operationLogs',
                name: 'OperationLogs',
                component: () => import('@/views/AdminConsole/rightsManage/operationLogs.vue'),
                meta:
                 {
                  menu: true,
                  title: '操作日志'
                 }
              },
           ]
        }
     ]
  },

注意,这里需要children里套children,index.vue里面的内容如下,需要给路由一个入口。

<script setup lang="ts"></script>
<template>
  <router-view></router-view>
</template>


http://www.kler.cn/a/152355.html

相关文章:

  • VMware Linux(Centos)虚拟机扩容根目录磁盘空间
  • mockito加junit gd 单元测试 笔记
  • 防火墙补充NAT
  • Flask学习二:项目拆分、请求与响应、cookie
  • 设计模式之装饰模式(2)--有意思的想法
  • Python与设计模式--解释器模式
  • Android UiAutoMatorViewer打不开
  • Nginx(八) aio sendfile directio 组合使用测试(1)
  • Pycharm中使用matplotlib绘制动态图形
  • Electron+Ts+Vue+Vite桌面应用系列:sqlite增删改查操作篇
  • Flutter应用程序的加固原理
  • 一些小笔记(Delphi)
  • cephadm部署ceph quincy版本,使用ceph-csi连接
  • [读论文][跑代码]BK-SDM: A Lightweight, Fast, and Cheap Version of Stable Diffusion
  • 设计模式总目录
  • 17.PIL报错`AttributeError: module ‘PIL.Image‘ has no attribute ‘ANTIALIAS‘`
  • NX二次开发UF_MTX2_copy 函数介绍
  • 数学建模-基于脑出血患者院前指标的多种机器学习预测模型构建及比较研究
  • 双向ESD保护 汽车级TVS二极管 ESD9B3.3ST5G工作原理、特性参数、封装形式
  • 数据结构-04-队列