Skip to content

Commit bbbd51f

Browse files
committed
optimize: 优化代码
1 parent 9c4725e commit bbbd51f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/pages/(base)/manage/user/[id].tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
const User = () => {
2-
return <div>User</div>;
2+
return <div>Use11</div>;
33
};
44

55
export const handle = {
6+
activeMenu: '/manage/user',
7+
hideInMenu: true,
68
i18nKey: 'route.(base)_manage_user_[id]',
79
title: '(base)_manage_user_[id]'
810
};

src/types/router.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,14 @@ declare namespace Router {
7474
url?: string | null;
7575
};
7676

77-
type Route<T = unknown> = UIMatch<T, RouteHandle> & {
77+
type Route<T = unknown, Q extends Record<string, string> = Record<string, string>> = UIMatch<T, RouteHandle> & {
78+
error: Error | null;
7879
fullPath: string;
7980
hash: string;
8081
matched: UIMatch<T, RouteHandle>[];
82+
pathname: string;
83+
query: Q;
84+
redirect: Route<T, Q> | null;
8185
search: string;
8286
};
8387

0 commit comments

Comments
 (0)