Skip to content

Commit

Permalink
feat: 调整路由结构,补充示例;更新效果图;
Browse files Browse the repository at this point in the history
  • Loading branch information
mulingyuer committed Jan 17, 2025
1 parent 755ea0f commit 29a137c
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 16 deletions.
1 change: 1 addition & 0 deletions .eslintrc-auto-import.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
"DirectiveBinding": true,
"EffectScope": true,
"ElMessage": true,
"ElNotification": true,
"ExtractDefaultPropTypes": true,
"ExtractPropTypes": true,
"ExtractPublicPropTypes": true,
Expand Down
Binary file modified docs/readme.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions src/router/guard/index.ts → src/router/guard.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*
* @Author: mulingyuer
* @Date: 2024-09-27 17:26:54
* @LastEditTime: 2024-10-15 11:53:05
* @LastEditTime: 2025-01-17 09:48:23
* @LastEditors: mulingyuer
* @Description: 路由守卫
* @FilePath: \element-admin-template\src\router\guard\index.ts
* @FilePath: \element-admin-template\src\router\guard.ts
* 怎么可能会有bug!!!
*/
import type { Router } from "vue-router";
import { routerAuthMap, RouterAuthContext } from "../router-auth";
import { routerAuthMap, RouterAuthContext } from "./router-auth";
import { NProgress } from "@/utils/nprogress";
import { useAppStore } from "@/stores";
import { initRoutes } from "../helpers";
import { modulesRoutes } from "../route-modules";
import { initRoutes } from "./helpers";
import { modulesRoutes } from "./route-modules";

export async function createRouterGuard(router: Router) {
const appStore = useAppStore();
Expand Down
4 changes: 2 additions & 2 deletions src/router/helpers/index.ts → src/router/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
* @Author: mulingyuer
* @Date: 2024-09-26 17:54:10
* @LastEditTime: 2024-09-29 09:09:31
* @LastEditTime: 2025-01-17 09:48:53
* @LastEditors: mulingyuer
* @Description: 路由辅助函数
* @FilePath: \spirit-app-microservice-admin\src\router\helpers\index.ts
* @FilePath: \element-admin-template\src\router\helpers\helpers.ts
* 怎么可能会有bug!!!
*/
import type { Router, RouteRecordRaw } from "vue-router";
Expand Down
7 changes: 4 additions & 3 deletions src/router/route-modules/dashboard.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
* @Author: mulingyuer
* @Date: 2024-09-26 17:38:16
* @LastEditTime: 2024-09-30 17:17:33
* @LastEditTime: 2025-01-17 10:06:47
* @LastEditors: mulingyuer
* @Description: 仪表盘
* @FilePath: \spirit-app-microservice-admin\src\router\route-modules\dashboard.ts
* @FilePath: \element-admin-template\src\router\route-modules\dashboard.ts
* 怎么可能会有bug!!!
*/
import type { RouteRecordRaw } from "vue-router";
Expand All @@ -17,6 +17,7 @@ export default {
title: "仪表盘",
icon: "ri-dashboard-3-line",
auth: "required",
affix: true
affix: true,
sort: 10
}
} as RouteRecordRaw;
22 changes: 22 additions & 0 deletions src/router/route-modules/outbound-link.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* @Author: mulingyuer
* @Date: 2025-01-17 10:01:42
* @LastEditTime: 2025-01-17 10:07:10
* @LastEditors: mulingyuer
* @Description: 外链
* @FilePath: \element-admin-template\src\router\route-modules\outbound-link.ts
* 怎么可能会有bug!!!
*/
import type { RouteRecordRaw } from "vue-router";

export default {
path: "https://github.com/mulingyuer/element-admin-template",
name: "OutboundLink",
component: h("div"),
meta: {
auth: "public",
title: "Github仓库",
icon: "ri-github-fill",
sort: 40
}
} as RouteRecordRaw;
6 changes: 3 additions & 3 deletions src/router/route-modules/test1.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
* @Author: mulingyuer
* @Date: 2024-09-29 09:13:25
* @LastEditTime: 2024-09-30 17:15:32
* @LastEditTime: 2025-01-17 10:06:59
* @LastEditors: mulingyuer
* @Description:
* @FilePath: \spirit-app-microservice-admin\src\router\route-modules\test1.ts
* @FilePath: \element-admin-template\src\router\route-modules\test1.ts
* 怎么可能会有bug!!!
*/
import type { RouteRecordRaw } from "vue-router";
Expand All @@ -17,6 +17,6 @@ export default {
meta: {
title: "测试1",
icon: "ri-arrow-up-circle-line",
sort: 2
sort: 20
}
} as RouteRecordRaw;
6 changes: 3 additions & 3 deletions src/router/route-modules/test2.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
* @Author: mulingyuer
* @Date: 2024-09-29 09:14:56
* @LastEditTime: 2024-09-30 17:18:02
* @LastEditTime: 2025-01-17 10:07:03
* @LastEditors: mulingyuer
* @Description:
* @FilePath: \spirit-app-microservice-admin\src\router\route-modules\test2.ts
* @FilePath: \element-admin-template\src\router\route-modules\test2.ts
* 怎么可能会有bug!!!
*/
import type { RouteRecordRaw } from "vue-router";
Expand All @@ -15,7 +15,7 @@ export default {
meta: {
title: "测试",
icon: "ri-flask-line",
sort: 1
sort: 30
},
children: [
{
Expand Down
File renamed without changes.

0 comments on commit 29a137c

Please sign in to comment.