index.js.bak 1.86 KB
import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

/* Layout */
import Layout from '@/layout'

const router = [
  {
    path: '/client',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/client/index'),
        name: 'client',
        meta: { title: 'client', icon: 'guide', noCache: true, activeMenu: '/client/index' }
      }
    ]
  },
  {
    path: '/user',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/user/index'),
        name: 'user',
        meta: { title: 'user', icon: 'user', noCache: true }
      }
    ]
  },
  {
    path: '/resource-type',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/resource-type/index'),
        name: 'resourceType',
        meta: { title: 'resourceType', icon: 'list', noCache: true }
      }
    ]
  },
  {
    path: '/resource',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/resource/index'),
        name: 'resource',
        meta: { title: 'resource', icon: 'lock', noCache: true }
      }
    ]
  },
  {
    path: '/message-type',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/message-type/index'),
        name: 'messageType',
        meta: { title: 'messageType', icon: 'message', noCache: true }
      }
    ]
  },
  {
    path: '/template',
    component: Layout,
    children: [
      {
        path: 'index',
        component: () => import('@/views/template/index'),
        name: 'template',
        meta: { title: 'template', icon: 'nested', noCache: true }
      }
    ]
  },
  { path: '*', redirect: '/404', hidden: true }
]

export default new Router({
  scrollBehavior: () => ({ y: 0 }),
  routes: router
})