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

78 lines
1.4 KiB
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 22:26:40 +08:00
* @LastEditTime: 2023-01-05 21:38:13
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",
2023-01-05 22:26:40 +08:00
hidden: true,
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 22:26:40 +08:00
hidden: true,
2023-01-05 13:18:28 +08:00
},
{
path: "/home",
name: "Home",
2023-01-05 22:26:40 +08:00
meta: {
title: "控制台"
},
children: [
{
path: "/console",
name: "Console",
mate: {
title: "首页"
},
component: () => import("../layout/Index.vue"),
},
],
2023-01-05 13:18:28 +08:00
component: () => import("../layout/Index.vue"),
2023-01-05 22:26:40 +08:00
},
{
path: "/news",
name: "News",
meta: {
title: "信息管理",
},
children: [
{
path: "/newsIndex",
name: "NewsIndex",
mate: {
title: "信息列表"
},
component: () => import("../layout/Index.vue"),
},
],
component: () => import("../layout/Index.vue"),
},
{
path: "/user",
name: "User",
meta: {
title: "人员管理",
},
component: () => import("../layout/Index.vue"),
},
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;