Skip to content

Commit 28e58e4

Browse files
committed
types: 添加完整路由配置表类型声明
1 parent a8e830f commit 28e58e4

File tree

17 files changed

+110
-16
lines changed

17 files changed

+110
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ dist
44
dist-ssr
55
*.local
66
.eslintcache
7+
report.html
78

89
yarn.lock
910
npm-debug.log*

src/layout/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export const routerArrays: Array<RouteConfigs> = [
1212

1313
export type routeMetaType = {
1414
title?: string;
15-
i18n?: boolean;
1615
icon?: string;
1716
showLink?: boolean;
1817
savedPosition?: boolean;
@@ -65,7 +64,6 @@ export type childrenType = {
6564
meta?: {
6665
icon?: string;
6766
title?: string;
68-
i18n?: boolean;
6967
showParent?: boolean;
7068
extraIcon?: {
7169
svg?: boolean;

src/router/modules/able.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { $t } from "/@/plugins/i18n";
2+
import type { RouteConfigsTable } from "/#/index";
23
const Layout = () => import("/@/layout/index.vue");
34

4-
const ableRouter = {
5+
const ableRouter: RouteConfigsTable = {
56
path: "/able",
67
component: Layout,
78
redirect: "/able/watermark",

src/router/modules/about.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { $t } from "/@/plugins/i18n";
2+
import type { RouteConfigsTable } from "/#/index";
23
const Layout = () => import("/@/layout/index.vue");
34

4-
const aboutRouter = {
5+
const aboutRouter: RouteConfigsTable = {
56
path: "/about",
67
component: Layout,
78
redirect: "/about/index",

src/router/modules/components.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { $t } from "/@/plugins/i18n";
2+
import type { RouteConfigsTable } from "/#/index";
23
const Layout = () => import("/@/layout/index.vue");
34

4-
const componentsRouter = {
5+
const componentsRouter: RouteConfigsTable = {
56
path: "/components",
67
component: Layout,
78
redirect: "/components/video",

src/router/modules/editor.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { $t } from "/@/plugins/i18n";
2+
import type { RouteConfigsTable } from "/#/index";
23
const Layout = () => import("/@/layout/index.vue");
34

4-
const editorRouter = {
5+
const editorRouter: RouteConfigsTable = {
56
path: "/editor",
67
component: Layout,
78
redirect: "/editor/index",

src/router/modules/error.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { $t } from "/@/plugins/i18n";
2+
import type { RouteConfigsTable } from "/#/index";
23
const Layout = () => import("/@/layout/index.vue");
34

4-
const errorRouter = {
5+
const errorRouter: RouteConfigsTable = {
56
path: "/error",
67
component: Layout,
78
redirect: "/error/403",

src/router/modules/flowchart.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { $t } from "/@/plugins/i18n";
2+
import type { RouteConfigsTable } from "/#/index";
23
const Layout = () => import("/@/layout/index.vue");
34

4-
const flowChartRouter = {
5+
const flowChartRouter: RouteConfigsTable = {
56
path: "/flowChart",
67
component: Layout,
78
redirect: "/flowChart/index",

src/router/modules/formdesign.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { $t } from "/@/plugins/i18n";
2+
import type { RouteConfigsTable } from "/#/index";
23
const Layout = () => import("/@/layout/index.vue");
34

4-
const formDesignRouter = {
5+
const formDesignRouter: RouteConfigsTable = {
56
path: "/formDesign",
67
component: Layout,
78
redirect: "/formDesign/index",

src/router/modules/guide.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { $t } from "/@/plugins/i18n";
2+
import type { RouteConfigsTable } from "/#/index";
23
const Layout = () => import("/@/layout/index.vue");
34

4-
const guideRouter = {
5+
const guideRouter: RouteConfigsTable = {
56
path: "/guide",
67
component: Layout,
78
redirect: "/guide/index",

0 commit comments

Comments
 (0)