From 68b7e29e3b41d7a762dd9759916067cbd43006d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A4=E7=9F=97?= Date: Thu, 7 May 2020 21:42:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=E5=A2=9E=E5=8A=A0=20getA?= =?UTF-8?q?ddonData=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../designer/src/document/document-model.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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; /**