MVP
This commit is contained in:
46
src/router/index.js
Normal file
46
src/router/index.js
Normal file
@@ -0,0 +1,46 @@
|
||||
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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user