mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-26 01:34:33 +08:00
feat: websocket功能 (默认关闭)
This commit is contained in:
@@ -22,6 +22,7 @@ export function useAppConfig(
|
||||
VITE_GLOB_RSA_PRIVATE_KEY,
|
||||
VITE_GLOB_RSA_PUBLIC_KEY,
|
||||
VITE_GLOB_SSE_ENABLE,
|
||||
VITE_GLOB_WEBSOCKET_ENABLE,
|
||||
} = config;
|
||||
|
||||
return {
|
||||
@@ -36,5 +37,7 @@ export function useAppConfig(
|
||||
rsaPublicKey: VITE_GLOB_RSA_PUBLIC_KEY,
|
||||
// 是否开启sse
|
||||
sseEnable: VITE_GLOB_SSE_ENABLE === 'true',
|
||||
// 是否开启websocket
|
||||
websocketEnable: VITE_GLOB_WEBSOCKET_ENABLE === 'true',
|
||||
};
|
||||
}
|
||||
|
||||
4
packages/types/global.d.ts
vendored
4
packages/types/global.d.ts
vendored
@@ -20,6 +20,8 @@ export interface VbenAdminProAppConfigRaw {
|
||||
VITE_GLOB_RSA_PUBLIC_KEY: string;
|
||||
// 是否开启sse 注意从配置文件获取的类型为string
|
||||
VITE_GLOB_SSE_ENABLE: string;
|
||||
// 开启websocket 注意从配置文件获取的类型为string
|
||||
VITE_GLOB_WEBSOCKET_ENABLE: string;
|
||||
}
|
||||
|
||||
export interface ApplicationConfig {
|
||||
@@ -35,6 +37,8 @@ export interface ApplicationConfig {
|
||||
rsaPublicKey: string;
|
||||
// 是否开启sse
|
||||
sseEnable: boolean;
|
||||
// 是否开启
|
||||
websocketEnable: boolean;
|
||||
}
|
||||
|
||||
declare global {
|
||||
|
||||
Reference in New Issue
Block a user