up
chenyc
2022-07-22 c7a95dae2c8c0a2fed4ceb8f7acb097598d346df
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import {
    createRouter, createWebHashHistory, RouteRecordRaw,
} from 'vue-router'
import { Session } from '@/utils/storage'
 
const routes: Array<RouteRecordRaw> = [
    // { path: '/', name: 'Home', component: () => import('@/views/home/index.vue')},
    { path: '/', name: 'test', component: () => import('@/views/home/index.vue')},
    { path: '/test', name: 'Home', component: () => import('@/views/test/index.vue')},
]
 
const router = createRouter({
    history: createWebHashHistory(),    // history 模式则使用 createWebHistory()
    routes,
})
 
export default router