import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/documents/HelloWorld'
import home from "@/components/home";
import element_ui from "@/components/documents/element_ui";
import vueStart from "@/components/documents/vueStart";
import xgplayerDoc from "@/components/documents/xgplayerDoc";
import lifeDoc from "@/components/documents/lifeDoc";
import hall from "@/components/hall";
import viewp from "@/components/swiperhome";
import gameHall from "@/components/gameHall";
import topTab from "@/components/topTab";
import matching from "@/components/matching";
import adminAddItem from "@/components/admin/adminAddItem";
import login from "../components/login";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/gameHall',
      name: 'gameHall',
      component: gameHall,
      meta: {
        keepAlive: true, //此组件需要被缓存
      },
    },
    {
      path: '/',
      name: 'login',
      component: login,
    },
    {
      path: '/topTab',
      name: 'topTab',
      component: topTab,
      meta: {
        keepAlive: true, //此组件需要被缓存
      },
    },
    {
      path: '/matching',
      name: 'matching',
      component: matching,
      // meta: {
      //   keepAlive: true, //此组件不需要被缓存
      // },
    },
    {
      path: '/adminAddItem',
      name: 'adminAddItem',
      component: adminAddItem
    },
    // {
    //   path: '/',
    //   name: 'topTab',
    //   component: topTab
    // },
    // {
    //   path: '/',
    //   name: 'hall',
    //   component: hall
    // },
    {
      path: '/home',
      name: 'home',
      component: home
    },
    {
      path: '/HelloWorld',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/element_ui',
      name: 'element_ui',
      component: element_ui
    },
    {
      path: '/vueStart',
      name: 'vueStart',
      component: vueStart
    },
    {
      path: '/xgplayerDoc',
      name: 'xgplayerDoc',
      component: xgplayerDoc
    },

  ]
})
