环境配置
This commit is contained in:
+4
-2
@@ -31,8 +31,10 @@ export class AppConfig {
|
||||
// this.applyLocalOverride();
|
||||
}
|
||||
|
||||
/** 外部读取用 */
|
||||
get env() { return this._cfg.env; }
|
||||
public getEnv(): Env { return this._cfg.env; }
|
||||
public isDev(): boolean { return this._cfg.env === Env.Dev; }
|
||||
public isTest(): boolean { return this._cfg.env === Env.Test; }
|
||||
public isProd(): boolean { return this._cfg.env === Env.Prod; }
|
||||
get endpoints() { return this._cfg.endpoints; }
|
||||
|
||||
/** 切换环境(开发工具用) */
|
||||
|
||||
Reference in New Issue
Block a user