import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
export default new Router({
  routes: [{
      path: '/',
      name: 'login',
      component: () => import('./views/Login.vue'),
      show: 0,
    },
    {
      path: '/data',
      name: '参赛数据',
      icon: 'el-icon-pie-chart',
      component: () => import('./views/Home.vue'),
      show: 1,
      isLeaf: 0,
      children: [{
        path: '/data',
        component: () => import('./views/data/index.vue'),
        name: '数据统计'
      }, ]
    },
    {
      path: '/match',
      name: '赛事管理',
      icon: 'el-icon-trophy-1',
      component: () => import('./views/Home.vue'),
      show: 1,
      isLeaf: 0,
      children: [{
        path: '/match',
        component: () => import('./views/match/index.vue'),
        name: '赛事管理'
      },{
        path: '/group',
        component: () => import('./views/match/index.vue'),
        name: '赛事分组'
      }, ]
    },
    {
      path: '/player',
      name: '选手管理',
      icon: 'el-icon-trophy-1',
      component: () => import('./views/Home.vue'),
      show: 1,
      isLeaf: 0,
      children: [{
        path: '/player',
        component: () => import('./views/match/index.vue'),
        name: '参数选手'
      } ]
    },
    {
      path: '/user',
      name: '用户管理',
      icon: 'el-icon-s-tools',
      component: () => import('./views/Home.vue'),
      show: 1,
      isLeaf: 1,
      children: [{
        path: '/user',
        component: () => import('./views/user/index.vue'),
        name: '用户管理'
      }, ]
    },
  ]
})