diff --git a/packages/amis-editor-core/rollup.config.js b/packages/amis-editor-core/rollup.config.js index d352a9368..2826b8759 100644 --- a/packages/amis-editor-core/rollup.config.js +++ b/packages/amis-editor-core/rollup.config.js @@ -67,7 +67,7 @@ export default [ maxSize: 10 }) ] - }), + }) ]) }, { @@ -97,7 +97,8 @@ function transpileDynamicImportForCJS(options) { return { left: 'Promise.resolve().then(function() {return new Promise(function(fullfill) {require([', - right: '], function(mod) {fullfill(tslib.__importStar(mod))})})})' + right: + '], function(mod) {fullfill(require("tslib").__importStar(mod))})})})' }; // return { diff --git a/packages/amis-editor-core/src/manager.ts b/packages/amis-editor-core/src/manager.ts index a3b71cc19..bc89f9aaf 100644 --- a/packages/amis-editor-core/src/manager.ts +++ b/packages/amis-editor-core/src/manager.ts @@ -1864,11 +1864,9 @@ export class EditorManager { ) { originHook?.(e, component, scoped, data, broadcasts); - if (component.props.$$id) { - const node = this.store.getNodeById( - component.props.$$id, - component.props.type - ); + const id = component.props.$$id || component.props.$$editor?.id; + if (id) { + const node = this.store.getNodeById(id, component.props.type); node?.info?.plugin?.rendererBeforeDispatchEvent?.( node, e,