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.
52 lines
1.0 KiB
52 lines
1.0 KiB
import { createRouter, createWebHistory } from 'vue-router';
|
|
// 还有 createWebHashHistory 和 createMemoryHistory
|
|
|
|
export const routes = [
|
|
// {
|
|
// path: '/store/overview',
|
|
// name: 'overview',
|
|
// meta: {
|
|
// title: '设备概览',
|
|
// icon: 'el-icon-data-board',
|
|
// },
|
|
// component: () => import('@/views/overview.vue'),
|
|
// },
|
|
];
|
|
|
|
export const user = [
|
|
{
|
|
path: '/store/user/signin',
|
|
name: 'signin',
|
|
meta: {},
|
|
component: () => import('views/user/sign-in.vue'),
|
|
},
|
|
{
|
|
path: '/store/user/pw-change',
|
|
name: 'pw-change',
|
|
meta: {},
|
|
component: () => import('views/user/pw-change.vue'),
|
|
},
|
|
];
|
|
|
|
const router = createRouter({
|
|
history: createWebHistory(),
|
|
routes: [
|
|
{
|
|
path: '/',
|
|
redirect: '/store/user/signin',
|
|
},
|
|
{
|
|
path: '/store',
|
|
redirect: '/store/user/signin',
|
|
},
|
|
{
|
|
path: '/store/home',
|
|
name: 'home',
|
|
component: () => import('views/Index.vue'),
|
|
children: routes,
|
|
},
|
|
...user,
|
|
],
|
|
});
|
|
|
|
export default router;
|
|
|