From 75626d877db017b8862b1d5e64d75f3af7ff667a Mon Sep 17 00:00:00 2001 From: xingmolu <591745264@qq.com> Date: Sat, 21 May 2022 16:40:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E5=BC=95=E6=93=8E=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=99=A8=E6=98=A0=E5=B0=84=E4=B8=A5=E6=A0=BC?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E8=A2=AB=E8=BF=87=E6=BB=A4=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/editor-core/src/config.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/editor-core/src/config.ts b/packages/editor-core/src/config.ts index 66011a14c..26a28e500 100644 --- a/packages/editor-core/src/config.ts +++ b/packages/editor-core/src/config.ts @@ -118,6 +118,10 @@ const VALID_ENGINE_OPTIONS = { type: 'array', description: '自定义 simulatorUrl 的地址', }, + requestHandlersMap: { + type: 'object', + description: '数据源引擎的请求处理器映射', + }, }; export interface EngineOptions { /** @@ -227,6 +231,9 @@ export interface EngineOptions { constants?: Record; }; + /** + * 数据源引擎的请求处理器映射 + */ requestHandlersMap: RequestHandlersMap; } @@ -316,7 +323,7 @@ export class EngineConfig { if (isValidKey(key)) { this.set(key, engineOptions[key]); } else { - logger.warn(`failed to config ${key} to engineConfig, only predefined options can be set under strict mode, predefined options: ${VALID_ENGINE_OPTIONS}`); + logger.warn(`failed to config ${key} to engineConfig, only predefined options can be set under strict mode, predefined options: `, VALID_ENGINE_OPTIONS); } }); } else {