import Vue from 'vue'
import Router from 'vue-router'
import index from '@/views/index.vue'
import module from '@/views/indexModule.vue'
import pack from '@/views/indexPack.vue'
import carousel from '@/views/indexCarousel.vue'
Vue.use(Router)
export const constantRouterMap = [
  {
    path: '/',
    name: 'index',
    component: index,
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/module',
    name: 'module',
    component: module,
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/pack',
    name: 'pack',
    component: pack,
    meta: {
      keepAlive: true
    }
  },
  {
    path: '/carousel',
    name: 'carousel',
    component: carousel,
    meta: {
      keepAlive: true
    }
  }
]
export default new Router({
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRouterMap
})

