设置activeMenu不生效

来源:11-1 创建电子书上传组件

weixin_慕慕2166866

2020-03-29

写回答

2回答

weixin_慕慕2166866

提问者

2020-03-29

export const asyncRoutes = [
  {
    path: '/book',
    name: 'book',
    redirect: '/book/create',
    component: Layout,
    meta: {
      title: '图书管理',
      icon: 'documentation',
      roles: ['admin', 'editor']
    },
    children: [
      {
        path: '/book/create',
        name: 'bookCreate',
        component: () => import('@/views/book/create'),
        meta: { title: '上传图书', icon: 'edit', roles: ['admin'] }
      },
      {
        path: '/book/edit',
        name: 'bookEdit',
        component: () => import('@/views/book/edit'),
        meta: {
          title: '编辑图书',
          icon: 'edit',
          roles: ['admin']
        },
        hidden: true,
        activeMenu: '/book/list'
      },
      {
        path: '/book/list',
        name: 'bookList',
        component: () => import('@/views/book/create'),
        meta: { title: '图书列表', icon: 'list', roles: ['editor', 'admin'] }
      }
    ]
  },

  { path: '*', redirect: '/', hidden: true }
]


0
2
weixin_慕慕2166866
回复
扬_灵
按照上述方法解决了问题,谢谢
2020-03-29
共2条回复

扬_灵

2020-03-29

同学你好,请上传下代码部分

0
0

Vue Element+Node.js开发企业通用管理后台系统

基于Element的中后台课程,一套中小型企业通用的后台管理系统

2829 学习 · 1715 问题

查看课程

相似问题