diff --git a/packages/amis-editor-core/src/component/factory.tsx b/packages/amis-editor-core/src/component/factory.tsx index 51f464b97..6bd88c3e6 100644 --- a/packages/amis-editor-core/src/component/factory.tsx +++ b/packages/amis-editor-core/src/component/factory.tsx @@ -20,6 +20,7 @@ import {Schema} from 'amis'; import type {DataScope} from 'amis-core'; import type {RendererConfig} from 'amis-core/lib/factory'; import {SchemaCollection} from 'amis/lib/Schema'; +import {omit} from 'lodash'; // 创建 Node Store 并构建成树 export function makeWrapper( @@ -302,7 +303,7 @@ function SchemaFrom({ popOverContainer }, { - ...env + ...omit(env, 'replaceText') // theme: 'cxd' // 右侧属性配置面板固定使用cxd主题展示 } ); diff --git a/packages/amis-editor-core/src/manager.ts b/packages/amis-editor-core/src/manager.ts index 5f5426c8a..a3e114215 100644 --- a/packages/amis-editor-core/src/manager.ts +++ b/packages/amis-editor-core/src/manager.ts @@ -65,6 +65,7 @@ import {IScopedContext} from 'amis'; import {SchemaObject, SchemaCollection} from 'amis/lib/Schema'; import type {RendererConfig} from 'amis-core/lib/factory'; import isPlainObject from 'lodash/isPlainObject'; +import {omit} from 'lodash'; export interface EditorManagerConfig extends Omit {} @@ -168,7 +169,7 @@ export class EditorManager { // 传给 amis 渲染器的默认 env this.env = { ...env, // 默认的 env 中带 jumpTo - ...config.amisEnv, // 用户也可以设置自定义环境配置,用于覆盖默认的 env + ...omit(config.amisEnv, 'replaceText'), // 用户也可以设置自定义环境配置,用于覆盖默认的 env theme: config.theme }; this.env.beforeDispatchEvent = this.beforeDispatchEvent.bind(