forked from TALL/tall3-pc-keti
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
679 B
27 lines
679 B
import { createRouter, createWebHistory } from 'vue-router';
|
|
// 还有 createWebHashHistory 和 createMemoryHistory
|
|
|
|
export const user = [{ path: '/user/signIn', name: 'signIn', component: () => import('views/user/SignIn.vue') }];
|
|
export const routes = [
|
|
{
|
|
path: '/home',
|
|
name: 'home',
|
|
redirect: '/home/test',
|
|
component: () => import('views/home/Index.vue'),
|
|
children: [{ path: '/home/test', name: 'test', component: () => import('views/detail/Test.vue') }],
|
|
},
|
|
];
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
redirect: '/home',
|
|
},
|
|
...user,
|
|
...routes,
|
|
],
|
|
});
|
|
|
|
export default router;
|
|
|