Blame view

src/router/modules/prod.js 1.28 KB
50760eab9   Adam   auto commit the c...
1
2
3
4
5
  /** When your routing table is too long, you can split it into small modules**/
  
  import Layout from '@/layout'
  
  const prodRouter = {
b58b17e1e   Adam   auto commit the c...
6
    path: '/prod',
50760eab9   Adam   auto commit the c...
7
8
9
10
11
    component: Layout,
    redirect: '/prod/page',
    alwaysShow: true, // will always show the root menu
    name: 'Prod',
    meta: {
b58b17e1e   Adam   auto commit the c...
12
      title: 'prods.prod_menu', // 会自动被i18n替换
50760eab9   Adam   auto commit the c...
13
14
15
      icon: 'star',
      roles: ['admin', 'assistant', 'runner', 'shoper'] // you can set roles in root nav
    },
a1b48a444   Adam   auto commit the c...
16
17
18
    children: [{
      path: 'list',
      component: () => import('@/views/prod/list'),
a86b16bba   Adam   auto commit the c...
19
      name: 'ProdList',
a1b48a444   Adam   auto commit the c...
20
21
22
      meta: {
        title: 'prods.prodlist',
        roles: ['admin', 'assistant', 'shoper', 'runner']
50760eab9   Adam   auto commit the c...
23
      }
a86b16bba   Adam   auto commit the c...
24
    }, {
398cda401   Adam   auto commit the c...
25
26
27
28
29
30
31
32
      path: 'fav',
      component: () => import('@/views/prod/fav'),
      name: 'ProdFav',
      meta: {
        title: 'prods.prodfav',
        roles: ['runner']
      }
    }, {
a86b16bba   Adam   auto commit the c...
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
      path: 'edit/:pid(\\d+)',
      component: () => import('@/views/prod/edit'),
      name: 'ProdEdit',
      meta: {
        title: 'prods.prodedit',
        noCache: true,
        activeMenu: '/prod/list'
      },
      hidden: true
    }, {
      path: 'create/:fid(\\d+)',
      component: () => import('@/views/prod/create'),
      name: 'ProdCreate',
      meta: {
        title: 'prods.prodcreate',
        noCache: true,
        activeMenu: '/prod/list'
      },
      hidden: true
a1b48a444   Adam   auto commit the c...
52
    }]
50760eab9   Adam   auto commit the c...
53
54
55
  }
  
  export default prodRouter