diff --git a/packages/amis-editor/package.json b/packages/amis-editor/package.json index 4b97a12de..db714549d 100644 --- a/packages/amis-editor/package.json +++ b/packages/amis-editor/package.json @@ -1,6 +1,6 @@ { "name": "amis-editor", - "version": "5.2.0-beta.5", + "version": "5.2.0-beta.6", "description": "amis 可视化编辑器", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/packages/amis-editor/src/plugin/Form/Item.tsx b/packages/amis-editor/src/plugin/Form/Item.tsx index 2ce0e63d1..1d3fb2803 100644 --- a/packages/amis-editor/src/plugin/Form/Item.tsx +++ b/packages/amis-editor/src/plugin/Form/Item.tsx @@ -25,6 +25,7 @@ export class ItemPlugin extends BasePlugin { panels: Array ) { const renderer = context.info.renderer; + const store = this.manager.store; if (context.selections.length) { return; @@ -42,7 +43,7 @@ export class ItemPlugin extends BasePlugin { title: this.panelTitle, render: this.manager.makeSchemaFormRender({ body: this.panelBodyCreator(context), - rendererName: plugin.rendererName, + panelById: store.activeId, formKey: 'form-item', }), order: -200 diff --git a/packages/amis-editor/src/plugin/Panel.tsx b/packages/amis-editor/src/plugin/Panel.tsx index 4bba19413..b64ef69a8 100644 --- a/packages/amis-editor/src/plugin/Panel.tsx +++ b/packages/amis-editor/src/plugin/Panel.tsx @@ -215,8 +215,8 @@ export class PanelPlugin extends BasePlugin { context: BuildPanelEventContext, panels: Array ) { - const plugin: PluginInterface = this; const schema = context.schema; + const store = this.manager.store; if ( context.info.renderer.name === 'form' && @@ -230,7 +230,7 @@ export class PanelPlugin extends BasePlugin { title: this.panelTitle, render: this.manager.makeSchemaFormRender({ body: this.panelBodyCreator(context), - rendererName: 'form' + panelById: store.activeId }) }); } else { diff --git a/packages/amis-editor/src/plugin/TableView.tsx b/packages/amis-editor/src/plugin/TableView.tsx index 07bec2ba7..79fb022fa 100644 --- a/packages/amis-editor/src/plugin/TableView.tsx +++ b/packages/amis-editor/src/plugin/TableView.tsx @@ -494,7 +494,7 @@ export class TableViewPlugin extends BasePlugin { panels: Array ) { super.buildEditorPanel(context, panels); - const plugin: PluginInterface = this; + const store = this.manager.store; if (context.info.schemaPath.endsWith('/td')) { panels.push({ @@ -509,7 +509,7 @@ export class TableViewPlugin extends BasePlugin { body: this.tdVRendererConfig.panelBodyCreator ? this.tdVRendererConfig.panelBodyCreator(context) : this.tdVRendererConfig.panelBody!, - rendererName: plugin.rendererName + panelById: store.activeId }) }); } else if (context.info.schemaPath.endsWith('/tr')) { @@ -525,7 +525,7 @@ export class TableViewPlugin extends BasePlugin { body: this.trVRendererConfig.panelBodyCreator ? this.trVRendererConfig.panelBodyCreator(context) : this.trVRendererConfig.panelBody!, - rendererName: plugin.rendererName + panelById: store.activeId }) }); }