Commit 8ad127c293872aa10db03044bbc68715dc1b804a
1 parent
8fb03961
fix: add route base close #404
Showing
12 changed files
with
30 additions
and
51 deletions
build/tsconfig.json deleted
100644 โ 0
1 | -{ | |
2 | - "compilerOptions": { | |
3 | - "target": "esnext", | |
4 | - "module": "commonjs", | |
5 | - "moduleResolution": "node", | |
6 | - "strict": true, | |
7 | - "forceConsistentCasingInFileNames": true, | |
8 | - "baseUrl": ".", | |
9 | - "esModuleInterop": true, | |
10 | - "noUnusedLocals": true, | |
11 | - "noUnusedParameters": true, | |
12 | - "experimentalDecorators": true, | |
13 | - "lib": ["dom", "esnext"], | |
14 | - "incremental": true, | |
15 | - "skipLibCheck": true | |
16 | - } | |
17 | -} |
build/typeing.d.ts deleted
100644 โ 0
build/utils.ts
... | ... | @@ -17,21 +17,6 @@ export function isReportMode(): boolean { |
17 | 17 | return process.env.REPORT === 'true'; |
18 | 18 | } |
19 | 19 | |
20 | -export interface ViteEnv { | |
21 | - VITE_PORT: number; | |
22 | - VITE_USE_MOCK: boolean; | |
23 | - VITE_USE_PWA: boolean; | |
24 | - VITE_PUBLIC_PATH: string; | |
25 | - VITE_PROXY: [string, string][]; | |
26 | - VITE_GLOB_APP_TITLE: string; | |
27 | - VITE_GLOB_APP_SHORT_NAME: string; | |
28 | - VITE_USE_CDN: boolean; | |
29 | - VITE_DROP_CONSOLE: boolean; | |
30 | - VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none'; | |
31 | - VITE_LEGACY: boolean; | |
32 | - VITE_USE_IMAGEMIN: boolean; | |
33 | -} | |
34 | - | |
35 | 20 | // Read all environment variable configuration files to process.env |
36 | 21 | export function wrapperEnv(envConf: Recordable): ViteEnv { |
37 | 22 | const ret: any = {}; | ... | ... |
build/vite/plugin/html.ts
build/vite/plugin/index.ts
build/vite/plugin/pwa.ts
mock/_util.ts
src/router/index.ts
... | ... | @@ -9,7 +9,7 @@ const WHITE_NAME_LIST = [LoginRoute.name, REDIRECT_NAME]; |
9 | 9 | |
10 | 10 | // app router |
11 | 11 | const router = createRouter({ |
12 | - history: createWebHashHistory(), | |
12 | + history: createWebHashHistory(import.meta.env.VITE_PUBLIC_PATH), | |
13 | 13 | routes: (basicRoutes as unknown) as RouteRecordRaw[], |
14 | 14 | strict: true, |
15 | 15 | scrollBehavior: () => ({ left: 0, top: 0 }), | ... | ... |
src/settings/projectSetting.ts
... | ... | @@ -20,7 +20,7 @@ const setting: ProjectConfig = { |
20 | 20 | settingButtonPosition: SettingButtonPositionEnum.AUTO, |
21 | 21 | |
22 | 22 | // Permission mode |
23 | - permissionMode: PermissionModeEnum.BACK, | |
23 | + permissionMode: PermissionModeEnum.ROLE, | |
24 | 24 | |
25 | 25 | // Permission-related cache is stored in sessionStorage or localStorage |
26 | 26 | permissionCacheType: CacheTypeEnum.LOCAL, | ... | ... |
tsconfig.json
types/event.d.ts deleted
100644 โ 0
types/global.d.ts
... | ... | @@ -61,3 +61,28 @@ declare type ComponentRef<T extends HTMLElement = HTMLDivElement> = ComponentElR |
61 | 61 | declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>; |
62 | 62 | |
63 | 63 | type IsSame<A, B> = A | B extends A & B ? true : false; |
64 | + | |
65 | +declare interface ChangeEvent extends Event { | |
66 | + target: HTMLInputElement; | |
67 | +} | |
68 | + | |
69 | +declare interface WheelEvent { | |
70 | + path?: EventTarget[]; | |
71 | +} | |
72 | + | |
73 | +type ImportMetaEnv = ViteEnv; | |
74 | + | |
75 | +declare interface ViteEnv { | |
76 | + VITE_PORT: number; | |
77 | + VITE_USE_MOCK: boolean; | |
78 | + VITE_USE_PWA: boolean; | |
79 | + VITE_PUBLIC_PATH: string; | |
80 | + VITE_PROXY: [string, string][]; | |
81 | + VITE_GLOB_APP_TITLE: string; | |
82 | + VITE_GLOB_APP_SHORT_NAME: string; | |
83 | + VITE_USE_CDN: boolean; | |
84 | + VITE_DROP_CONSOLE: boolean; | |
85 | + VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none'; | |
86 | + VITE_LEGACY: boolean; | |
87 | + VITE_USE_IMAGEMIN: boolean; | |
88 | +} | ... | ... |