ruoyi-plus-vben5/packages/types/global.d.ts

45 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-06-02 15:04:37 +08:00
import type { RouteMeta as IRouteMeta } from '@vben-core/typings';
2024-05-19 21:20:42 +08:00
2024-06-08 19:49:06 +08:00
import 'vue-router';
2024-06-02 15:04:37 +08:00
declare module 'vue-router' {
2024-08-01 00:06:36 +08:00
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
2024-06-02 15:04:37 +08:00
interface RouteMeta extends IRouteMeta {}
2024-05-19 21:20:42 +08:00
}
export interface VbenAdminProAppConfigRaw {
2024-08-07 08:57:56 +08:00
// 后端接口地址
VITE_GLOB_API_URL: string;
2024-08-07 08:57:56 +08:00
// 客户端ID
VITE_GLOB_APP_CLIENT_ID: string;
// # 全局加密开关(即开启了加解密功能才会生效 不是全部接口加密 需要和后端对应)
VITE_GLOB_ENABLE_ENCRYPT: string;
// RSA请求解密私钥
VITE_GLOB_RSA_PRIVATE_KEY: string;
// RSA请求加密公钥
VITE_GLOB_RSA_PUBLIC_KEY: string;
2024-12-19 11:27:23 +08:00
// 是否开启sse 注意从配置文件获取的类型为string
VITE_GLOB_SSE_ENABLE: string;
}
export interface ApplicationConfig {
2024-08-07 08:57:56 +08:00
// 后端接口地址
apiURL: string;
2024-08-07 08:57:56 +08:00
// 客户端key
clientId: string;
// 全局加密开关(即开启了加解密功能才会生效 不是全部接口加密 需要和后端对应)
enableEncrypt: boolean;
// RSA响应解密私钥
rsaPrivateKey: string;
// RSA请求加密公钥
rsaPublicKey: string;
2024-12-19 11:27:23 +08:00
// 是否开启sse
sseEnable: boolean;
}
declare global {
interface Window {
_VBEN_ADMIN_PRO_APP_CONF_: VbenAdminProAppConfigRaw;
}
}