若依_配置三级菜单或多级菜单

若依直接在router文件里配置的,没有在若依的菜单管理里配
然后也出现了上面链接里的那个中出现头部、左侧菜单和面包屑的情况

完整代码

{
    path: '/zichan',
    meta: { title: '零星资产处置审批', icon: 'dashboard', affix: true, noCache: true },
    component: Layout,
    // redirect: 'noredirect',
    hidden: false,
    breadcrumb: false,
    children: [
      {
        path: '/stock',
        meta: { title: '存货模块', icon: 'dashboard', affix: true, noCache: true },
        component: ParentView,
        // redirect: 'index',
        hidden: false,

        children: [
          {
            path: '/cutting',
            meta: { title: '打切件', icon: 'dashboard', affix: true, noCache: true },
            component: ParentView,
            // redirect: 'index',
            hidden: false,
            children: [
              {
                path: '/cutting/cutting1',
                component: () => import('@/views/project/stock/cutting/cutting1/cutting1'),
                name: 'cutting1',
                meta: { title: '打切件1', icon: 'user,', affix: true, breadcrumb: false, noCache: true }
              },
              {
                path: '/cutting/cutting2',
                component: () => import('@/views/project/stock/cutting/cutting2/cutting2'),
                name: 'cutting2',
                meta: { title: '打切件2', icon: 'user', affix: true, breadcrumb: false, noCache: true }
              }
            ]
          },
          {
            path: '/ItemInStock',
            meta: { title: '在库件', icon: 'dashboard', affix: true, noCache: true },
            // component: Layout,
            // redirect: 'index',
            hidden: false,

          },
          {
            path: '/equipment',
            meta: { title: '资材', icon: 'dashboard', affix: true, noCache: true },
            // component: Layout,
            // redirect: 'index',
            hidden: false,

          }

        ]
      },
      {
        path: '/lingxing',
        meta: { title: '零星资产模块', icon: 'dashboard', affix: true, noCache: true },
        component: ParentView,
        // redirect: 'noredirect',
        hidden: false,
        children: [
          {
            path: '/NotAccount',
            meta: { title: '不在账', icon: 'dashboard', affix: true, noCache: true },
            component: ParentView,
            // redirect: 'noredirect',
            hidden: false,
            children: [
              {
                path: '/qingdanList',
                component: () => import('@/views/project/qingdanList/index'),
                name: 'qingdanList',
                meta: { title: '清单查询', icon: 'dashboard', affix: true, breadcrumb: false, noCache: true }
              },
              {
                path: '/qingdanDetail',
                component: () => import('@/views/project/qingdanDetail/index'),
                name: 'qingdanDetail',
                meta: { title: '零星资产', icon: 'dashboard', affix: true, breadcrumb: false, noCache: true }
              },
              {
                path: '/waste',
                component: () => import('@/views/project/waste/index'),
                name: 'waste',
                meta: { title: '有价废弃物', icon: 'dashboard', affix: true, breadcrumb: false, noCache: true }
              },
              {
                path: '/property',
                component: () => import('@/views/project/property/index'),
                name: 'property',
                meta: { title: '资产', icon: 'dashboard', affix: true, breadcrumb: false, noCache: true }
              },
              {
                path: '/jiaojieList',
                component: () => import('@/views/project/jiaojieList/index'),
                name: 'JiaojieList',
                meta: { title: '预处置资产清单', icon: 'dashboard', affix: true, breadcrumb: false, noCache: true }
              },
              {
                path: '/jiaojieList1',
                component: () => import('@/views/project/jiaojieList1/index'),
                name: 'JiaojieList1',
                meta: { title: '月资产处置明细', icon: 'dashboard', affix: true, breadcrumb: false, noCache: true }
              },
            ]
          },
          {
            path: '/cutter',
            meta: { title: '刀具', icon: 'dashboard', affix: true, noCache: true },
            component: ParentView,
            // redirect: 'noredirect',
            hidden: false,
          },
          {
            path: '/GrindingTool',
            meta: { title: '磨具', icon: 'dashboard', affix: true, noCache: true },
            component: ParentView,
            // redirect: 'noredirect',
            hidden: false,
          }
        ]
      },
      {
        path: '/GeneralValuable',
        meta: { title: '一般有价废弃物模块', icon: 'dashboard', affix: true, noCache: true },
        component: ParentView,
        // redirect: 'noredirect',
        hidden: false,
        children: [{
          path: '/Referenced',
          meta: { title: '引在制系统', icon: 'dashboard', affix: true, noCache: true },
          component: ParentView,
          // redirect: 'noredirect',
          hidden: false,
        },
        {
          path: '/Citation',
          meta: { title: '引日报系统', icon: 'dashboard', affix: true, noCache: true },
          component: ParentView,
          // redirect: 'noredirect',
          hidden: false,
        },{
          path: '/Market',
          meta: { title: '市场不良报废件', icon: 'dashboard', affix: true, noCache: true },
          component: ParentView,
          // redirect: 'noredirect',
          hidden: false,
        },]
      }

    ]
  },

效果

关键代码

//一级菜单
import Layout from '@/layout'
//二级,三级菜单
import ParentView from '@/components/ParentView'
//除了一级路由要写

component: Layout,


后面二,三级豆写

component: ParentView,

假如只配置一级,直接写这个即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值