refactor: ♻️ 字典重构,系统权限模块优化
This commit is contained in:
40
src/types/env.d.ts
vendored
Normal file
40
src/types/env.d.ts
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
// https://cn.vitejs.dev/guide/env-and-mode
|
||||
|
||||
declare module "*.vue" {
|
||||
import { DefineComponent } from "vue";
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
||||
const component: DefineComponent<{}, {}, any>;
|
||||
export default component;
|
||||
}
|
||||
|
||||
// TypeScript 类型提示都为 string: https://github.com/vitejs/vite/issues/6930
|
||||
interface ImportMetaEnv {
|
||||
/** 应用端口 */
|
||||
VITE_APP_PORT: number;
|
||||
/** API 基础路径(代理前缀) */
|
||||
VITE_APP_BASE_API: string;
|
||||
/** API 地址 */
|
||||
VITE_APP_API_URL: string;
|
||||
/** 是否开启 Mock 服务 */
|
||||
VITE_MOCK_DEV_SERVER: boolean;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 平台的名称、版本、运行所需的`node`版本、依赖、构建时间的类型提示
|
||||
*/
|
||||
declare const __APP_INFO__: {
|
||||
pkg: {
|
||||
name: string;
|
||||
version: string;
|
||||
engines: {
|
||||
node: string;
|
||||
};
|
||||
dependencies: Record<string, string>;
|
||||
devDependencies: Record<string, string>;
|
||||
};
|
||||
buildTimestamp: number;
|
||||
};
|
||||
Reference in New Issue
Block a user