// import Vue from 'vue'
// import VueRouter from 'vue-router'
import Layout from './views/layout/index.vue'
//import Home from './views/Home.vue'
import Design from './views/design/index.vue'
import store from './store/index'

// Vue.use(VueRouter)

const router =new VueRouter({
  //mode: 'history',
  mode: 'hash',
  // base: import.meta.env.VITE_BASE_URL,
  routes: [
    {
      path: '/',
      name: 'home',
      meta: {},
      component: Layout
    },{
      path: '/design',
      name: 'design',
      meta: { title: Vue.prototype.$t('hivuiMain_des_title')},
      component: Design
    },{
      path: '/taskCenter',
      name: 'taskCenter',
      meta: {},
      component: () => import( './views/taskCenter.vue')
    },{
      path: '/personalCenter',
      name: 'personalCenter',
      meta: {},
      component: () => import( './views/personalCenter/index.vue')
    },{
      path: '/modifyPw',
      name: 'modifyPw',
      meta: {},
      component: () => import( './views/modifyPw/index.vue')
    },{
      path: '/About',
      name: 'About',
      meta: {},
      component: () => import( './views/About.vue')
    },
    {
      path: '/test',
      name: 'testApi',
      meta: {},
      component: () => import( './views/test/index.vue')
    },
    /*
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      // webpackChunkName: "about" 
      component: () => import( './views/About.vue')
    },
    */ 
    {
      path: '*',
      name: 'home',
      meta: {},
      component: Layout
    },
  ]
}) 
export default router;