[M] Move router to scripts
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import {createRouter, createWebHashHistory, RouteRecordRaw} from 'vue-router'
|
||||
import Home from '../views/Home.vue'
|
||||
|
||||
const routes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: Home
|
||||
},
|
||||
{
|
||||
path: '/new-home',
|
||||
name: 'New Home',
|
||||
component: () => import('../views/NewHome.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.
|
||||
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
|
||||
},
|
||||
{
|
||||
path: '/life',
|
||||
name: 'Life',
|
||||
component: () => import('../views/Life.vue')
|
||||
},
|
||||
{
|
||||
path: '/color',
|
||||
name: 'ColorPicker',
|
||||
component: () => import('../views/color/ColorPickerTest.vue')
|
||||
},
|
||||
{
|
||||
path: '/projects',
|
||||
name: 'Projects',
|
||||
component: () => import('../views/Projects.vue')
|
||||
}
|
||||
]
|
||||
|
||||
export const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes
|
||||
})
|
||||
|
||||
export default router
|
||||
Reference in New Issue
Block a user