Commit 7dce50cb1f70da050bef689deac29de397005f8b
1 parent
d3d620f4
chore: typo
Showing
9 changed files
with
42 additions
and
52 deletions
src/api/sys/model/menuModel.ts
src/layouts/default/content/index.vue
... | ... | @@ -5,9 +5,7 @@ |
5 | 5 | </template> |
6 | 6 | <script lang="ts"> |
7 | 7 | import { defineComponent } from 'vue'; |
8 | - | |
9 | 8 | import PageLayout from '/@/layouts/page/index.vue'; |
10 | - | |
11 | 9 | import { useDesign } from '/@/hooks/web/useDesign'; |
12 | 10 | import { useRootSetting } from '/@/hooks/setting/useRootSetting'; |
13 | 11 | import { useTransitionSetting } from '/@/hooks/setting/useTransitionSetting'; | ... | ... |
src/layouts/default/content/useContentContext.ts
1 | 1 | import type { InjectionKey, ComputedRef } from 'vue'; |
2 | 2 | import { createContext, useContext } from '/@/hooks/core/useContext'; |
3 | 3 | |
4 | -import {} from 'vue'; | |
5 | - | |
6 | 4 | export interface ContentContextProps { |
7 | 5 | contentHeight: ComputedRef<number>; |
8 | 6 | setPageHeight: (height: number) => Promise<void>; | ... | ... |
src/router/routes/basic.ts
... | ... | @@ -47,7 +47,7 @@ export const REDIRECT_ROUTE: AppRouteRecordRaw = { |
47 | 47 | |
48 | 48 | export const ERROR_LOG_ROUTE: AppRouteRecordRaw = { |
49 | 49 | path: '/error-log', |
50 | - name: 'errorLog', | |
50 | + name: 'ErrorLog', | |
51 | 51 | component: LAYOUT, |
52 | 52 | meta: { |
53 | 53 | title: 'ErrorLog', |
... | ... | @@ -56,7 +56,7 @@ export const ERROR_LOG_ROUTE: AppRouteRecordRaw = { |
56 | 56 | children: [ |
57 | 57 | { |
58 | 58 | path: 'list', |
59 | - name: 'errorLogList', | |
59 | + name: 'ErrorLogList', | |
60 | 60 | component: () => import('/@/views/sys/error-log/index.vue'), |
61 | 61 | meta: { |
62 | 62 | title: t('routes.basic.errorLogList'), | ... | ... |
src/router/types.ts
1 | -import type { RouteRecordRaw } from 'vue-router'; | |
1 | +import type { RouteRecordRaw, RouteMeta } from 'vue-router'; | |
2 | 2 | import { RoleEnum } from '/@/enums/roleEnum'; |
3 | - | |
4 | 3 | import { defineComponent } from 'vue'; |
5 | 4 | |
6 | 5 | export type Component<T extends any = any> = |
... | ... | @@ -8,49 +7,6 @@ export type Component<T extends any = any> = |
8 | 7 | | (() => Promise<typeof import('*.vue')>) |
9 | 8 | | (() => Promise<T>); |
10 | 9 | |
11 | -export interface RouteMeta { | |
12 | - // title | |
13 | - title: string; | |
14 | - // Whether to ignore permissions | |
15 | - ignoreAuth?: boolean; | |
16 | - // role info | |
17 | - roles?: RoleEnum[]; | |
18 | - // Whether not to cache | |
19 | - ignoreKeepAlive?: boolean; | |
20 | - // Is it fixed on tab | |
21 | - affix?: boolean; | |
22 | - // icon on tab | |
23 | - icon?: string; | |
24 | - | |
25 | - frameSrc?: string; | |
26 | - | |
27 | - // current page transition | |
28 | - transitionName?: string; | |
29 | - | |
30 | - // Whether the route has been dynamically added | |
31 | - hideBreadcrumb?: boolean; | |
32 | - | |
33 | - // Hide submenu | |
34 | - hideChildrenInMenu?: boolean; | |
35 | - | |
36 | - // Carrying parameters | |
37 | - carryParam?: boolean; | |
38 | - | |
39 | - // Used internally to mark single-level menus | |
40 | - single?: boolean; | |
41 | - | |
42 | - // Currently active menu | |
43 | - currentActiveMenu?: string; | |
44 | - | |
45 | - // Never show in tab | |
46 | - hideTab?: boolean; | |
47 | - | |
48 | - // Never show in menu | |
49 | - hideMenu?: boolean; | |
50 | - | |
51 | - isLink?: boolean; | |
52 | -} | |
53 | - | |
54 | 10 | // @ts-ignore |
55 | 11 | export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> { |
56 | 12 | name: string; |
... | ... | @@ -61,6 +17,7 @@ export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> { |
61 | 17 | props?: Recordable; |
62 | 18 | fullPath?: string; |
63 | 19 | } |
20 | + | |
64 | 21 | export interface MenuTag { |
65 | 22 | type?: 'primary' | 'error' | 'warn' | 'success'; |
66 | 23 | content?: string; | ... | ... |
types/index.d.ts
types/store.ts renamed to types/store.d.ts
types/utils.ts renamed to types/utils.d.ts
types/vue-router.d.ts
0 → 100644
1 | +export {}; | |
2 | + | |
3 | +declare module 'vue-router' { | |
4 | + interface RouteMeta extends Record<string | number | symbol, unknown> { | |
5 | + // title | |
6 | + title: string; | |
7 | + // Whether to ignore permissions | |
8 | + ignoreAuth?: boolean; | |
9 | + // role info | |
10 | + roles?: RoleEnum[]; | |
11 | + // Whether not to cache | |
12 | + ignoreKeepAlive?: boolean; | |
13 | + // Is it fixed on tab | |
14 | + affix?: boolean; | |
15 | + // icon on tab | |
16 | + icon?: string; | |
17 | + frameSrc?: string; | |
18 | + // current page transition | |
19 | + transitionName?: string; | |
20 | + // Whether the route has been dynamically added | |
21 | + hideBreadcrumb?: boolean; | |
22 | + // Hide submenu | |
23 | + hideChildrenInMenu?: boolean; | |
24 | + // Carrying parameters | |
25 | + carryParam?: boolean; | |
26 | + // Used internally to mark single-level menus | |
27 | + single?: boolean; | |
28 | + // Currently active menu | |
29 | + currentActiveMenu?: string; | |
30 | + // Never show in tab | |
31 | + hideTab?: boolean; | |
32 | + // Never show in menu | |
33 | + hideMenu?: boolean; | |
34 | + isLink?: boolean; | |
35 | + } | |
36 | +} | ... | ... |