提交 a85c4d90 编写于 作者: Cano1997's avatar Cano1997

update: 添加环境自定义参数

上级 7da52f11
......@@ -14,3 +14,4 @@ disableChangePwd:DISABLECHANGEPWD
enableGridRowBreak:ENABLEGRIDROWBREAK
publicKey:PUBLICKEY
enableRSA:ENABLERSA
customParams:CUSTOMPARAMS
\ No newline at end of file
/* eslint-disable @typescript-eslint/no-explicit-any */
const envMap = new Map([
['baseUrl', 'BaseUrl'],
['remoteModelUrl', 'remoteDynaPath'],
......@@ -13,9 +14,12 @@ export async function attachEnvironmentConfig(): Promise<void> {
Object.keys(ibiz.env).forEach(key => {
const key2 = envMap.has(key) ? envMap.get(key)! : key;
if (env[key2]) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if (key2 === 'customParams') {
(ibiz.env as any)[key] = JSON.parse(env[key2]);
} else {
(ibiz.env as any)[key] = ibiz.util.rawValue.format(env[key2]);
}
}
});
if (env.AppTitle) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册