使用vue-element-admin框架时如何添加多级目录


一、添加三层路由

{
    path: '/system',//一级
    component: Layout,
    meta: { title: '系统管理', icon: 'guide' },
    children: [
        {
        path: '/authManage',//二级
        component: () => import('@/views/system/authManage/index'),
        redirect: 'noRedirect',
        meta: { title: '权限管理', icon: 'point' },
        children: [
          {
            path: 'roleAuth',//三级
            name: 'roleAuth',
            component: () => import('@/views/system/authManage/roleAuth'),
            meta: { title: '角色权限管理', icon: 'point' }
          },
          {
            path: 'orgAuth',// 三级
            name: 'orgAuth',
            component: () => import('@/views/system/authManage/orgAuth'),
            meta: { title: '部门权限管理', icon: 'point' }
          }
        ]
      }
    ]
}

 

二、在二级目录下添加index.vue

<template>
  <router-view />
</template>

如图所示:

 

 

以上就是vue-element-admin框架添加多级目录的方法分享。

 

转载请注明地址:https://www.cnblogs.com/merryan-share/p/13840607.html

/****************************我是可爱的分割线********************************/


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM