Files
vue-learning/企业级管理系统/web/admin_system/src/router/index.js

37 lines
697 B
JavaScript
Raw Normal View History

2022-12-14 18:34:45 +08:00
/*
* @Author: Kane
* @Date: 2022-12-14 15:12:46
* @LastEditors: Kane
2023-01-05 13:18:28 +08:00
* @LastEditTime: 2023-01-04 11:26:12
2022-12-14 18:34:45 +08:00
* @FilePath: \admin_system\src\router\index.js
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
2023-01-05 13:18:28 +08:00
import { createRouter, createWebHashHistory } from 'vue-router';
2022-12-14 15:23:07 +08:00
const routes = [
{
2022-12-14 18:34:45 +08:00
path: "/",
2023-01-05 13:18:28 +08:00
name: "Root",
redirect: "Home",
2022-12-14 15:23:07 +08:00
},
{
2022-12-14 18:34:45 +08:00
path: "/login",
name: "Login",
component: () => import("../views/account/Login.vue"),
2023-01-05 13:18:28 +08:00
},
{
path: "/home",
name: "Home",
component: () => import("../layout/Index.vue"),
2022-12-14 15:23:07 +08:00
}
2022-12-14 18:34:45 +08:00
];
2022-12-14 15:23:07 +08:00
const router = createRouter({
history: createWebHashHistory(),
routes
2023-01-05 13:18:28 +08:00
});
2022-12-14 15:23:07 +08:00
2023-01-05 13:18:28 +08:00
export default router;