diff --git a/packages/designer/src/document/document-model.ts b/packages/designer/src/document/document-model.ts index 16f3df6d6..e4442734f 100644 --- a/packages/designer/src/document/document-model.ts +++ b/packages/designer/src/document/document-model.ts @@ -41,6 +41,7 @@ export class DocumentModel { private seqId = 0; private _simulator?: ISimulatorHost; + /** * 模拟器 */ @@ -110,6 +111,14 @@ export class DocumentModel { } readonly designer = this.project.designer; + // getAddonData(name: string) { + // const addon = this.addons.find((item) => item.name === name); + // if (addon) { + // return addon.exportData(); + // } + // return this.addonsData[name]; + // } + /** * 生成唯一id @@ -230,6 +239,14 @@ export class DocumentModel { this.selection.remove(node.id); node.remove(); } + getAddonData(name: string) { + const addon = this.getNode(name) + if (addon) { + // 无法确定是否有这个api + // return addon.exportData(); + } + return addon + } @obx.ref private _dropLocation: DropLocation | null = null; /**