mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-01-23 09:40:22 +08:00
fix: add route base close #404
This commit is contained in:
parent
8fb03961f5
commit
8ad127c293
@ -1,17 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "esnext",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"baseUrl": ".",
|
||||
"esModuleInterop": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"experimentalDecorators": true,
|
||||
"lib": ["dom", "esnext"],
|
||||
"incremental": true,
|
||||
"skipLibCheck": true
|
||||
}
|
||||
}
|
6
build/typeing.d.ts
vendored
6
build/typeing.d.ts
vendored
@ -1,6 +0,0 @@
|
||||
declare module '*.json' {
|
||||
const src: any;
|
||||
export default src;
|
||||
}
|
||||
|
||||
declare type Recordable = Record<string, any>;
|
@ -17,21 +17,6 @@ export function isReportMode(): boolean {
|
||||
return process.env.REPORT === 'true';
|
||||
}
|
||||
|
||||
export interface ViteEnv {
|
||||
VITE_PORT: number;
|
||||
VITE_USE_MOCK: boolean;
|
||||
VITE_USE_PWA: boolean;
|
||||
VITE_PUBLIC_PATH: string;
|
||||
VITE_PROXY: [string, string][];
|
||||
VITE_GLOB_APP_TITLE: string;
|
||||
VITE_GLOB_APP_SHORT_NAME: string;
|
||||
VITE_USE_CDN: boolean;
|
||||
VITE_DROP_CONSOLE: boolean;
|
||||
VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none';
|
||||
VITE_LEGACY: boolean;
|
||||
VITE_USE_IMAGEMIN: boolean;
|
||||
}
|
||||
|
||||
// Read all environment variable configuration files to process.env
|
||||
export function wrapperEnv(envConf: Recordable): ViteEnv {
|
||||
const ret: any = {};
|
||||
|
@ -3,7 +3,6 @@
|
||||
* https://github.com/anncwb/vite-plugin-html
|
||||
*/
|
||||
import type { Plugin } from 'vite';
|
||||
import type { ViteEnv } from '../../utils';
|
||||
|
||||
import html from 'vite-plugin-html';
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import type { Plugin } from 'vite';
|
||||
import type { ViteEnv } from '../../utils';
|
||||
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||
|
@ -2,7 +2,6 @@
|
||||
* Zero-config PWA for Vite
|
||||
* https://github.com/antfu/vite-plugin-pwa
|
||||
*/
|
||||
import type { ViteEnv } from '../../utils';
|
||||
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
// Interface data format used to return a unified format
|
||||
|
||||
export function resultSuccess<T = any>(result: T, { message = 'ok' } = {}) {
|
||||
export function resultSuccess<T = Recordable>(result: T, { message = 'ok' } = {}) {
|
||||
return {
|
||||
code: 0,
|
||||
result,
|
||||
|
@ -9,7 +9,7 @@ const WHITE_NAME_LIST = [LoginRoute.name, REDIRECT_NAME];
|
||||
|
||||
// app router
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
history: createWebHashHistory(import.meta.env.VITE_PUBLIC_PATH),
|
||||
routes: (basicRoutes as unknown) as RouteRecordRaw[],
|
||||
strict: true,
|
||||
scrollBehavior: () => ({ left: 0, top: 0 }),
|
||||
|
@ -20,7 +20,7 @@ const setting: ProjectConfig = {
|
||||
settingButtonPosition: SettingButtonPositionEnum.AUTO,
|
||||
|
||||
// Permission mode
|
||||
permissionMode: PermissionModeEnum.BACK,
|
||||
permissionMode: PermissionModeEnum.ROLE,
|
||||
|
||||
// Permission-related cache is stored in sessionStorage or localStorage
|
||||
permissionCacheType: CacheTypeEnum.LOCAL,
|
||||
|
@ -34,6 +34,8 @@
|
||||
"src/**/*.vue",
|
||||
"types/**/*.d.ts",
|
||||
"types/**/*.ts",
|
||||
"build/**/*.ts",
|
||||
"build/**/*.d.ts",
|
||||
"mock/**/*.ts"
|
||||
],
|
||||
"exclude": ["node_modules", "dist", "**/*.js"]
|
||||
|
7
types/event.d.ts
vendored
7
types/event.d.ts
vendored
@ -1,7 +0,0 @@
|
||||
declare interface ChangeEvent extends Event {
|
||||
target: HTMLInputElement;
|
||||
}
|
||||
|
||||
declare interface WheelEvent {
|
||||
path?: EventTarget[];
|
||||
}
|
25
types/global.d.ts
vendored
25
types/global.d.ts
vendored
@ -61,3 +61,28 @@ declare type ComponentRef<T extends HTMLElement = HTMLDivElement> = ComponentElR
|
||||
declare type ElRef<T extends HTMLElement = HTMLDivElement> = Nullable<T>;
|
||||
|
||||
type IsSame<A, B> = A | B extends A & B ? true : false;
|
||||
|
||||
declare interface ChangeEvent extends Event {
|
||||
target: HTMLInputElement;
|
||||
}
|
||||
|
||||
declare interface WheelEvent {
|
||||
path?: EventTarget[];
|
||||
}
|
||||
|
||||
type ImportMetaEnv = ViteEnv;
|
||||
|
||||
declare interface ViteEnv {
|
||||
VITE_PORT: number;
|
||||
VITE_USE_MOCK: boolean;
|
||||
VITE_USE_PWA: boolean;
|
||||
VITE_PUBLIC_PATH: string;
|
||||
VITE_PROXY: [string, string][];
|
||||
VITE_GLOB_APP_TITLE: string;
|
||||
VITE_GLOB_APP_SHORT_NAME: string;
|
||||
VITE_USE_CDN: boolean;
|
||||
VITE_DROP_CONSOLE: boolean;
|
||||
VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none';
|
||||
VITE_LEGACY: boolean;
|
||||
VITE_USE_IMAGEMIN: boolean;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user