From 801d954417a2d19ba7c3b4960f5b66d63e6c64a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E7=86=A0?= Date: Mon, 11 May 2020 23:39:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20error=20when=20quick=20se?= =?UTF-8?q?arch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/designer/src/document/document-model.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/designer/src/document/document-model.ts b/packages/designer/src/document/document-model.ts index e4442734f..fe7908500 100644 --- a/packages/designer/src/document/document-model.ts +++ b/packages/designer/src/document/document-model.ts @@ -41,7 +41,6 @@ export class DocumentModel { private seqId = 0; private _simulator?: ISimulatorHost; - /** * 模拟器 */ @@ -119,7 +118,6 @@ export class DocumentModel { // return this.addonsData[name]; // } - /** * 生成唯一id */ @@ -240,12 +238,12 @@ export class DocumentModel { node.remove(); } getAddonData(name: string) { - const addon = this.getNode(name) + const addon = this.getNode(name); if (addon) { // 无法确定是否有这个api // return addon.exportData(); } - return addon + return addon; } @obx.ref private _dropLocation: DropLocation | null = null; @@ -485,7 +483,8 @@ export class DocumentModel { // add toData toData() { - return { componentsTree: [this.project?.currentDocument?.export(TransformStage.Save)] }; + const node = this.project?.currentDocument?.export(TransformStage.Serilize); + return { componentsTree: [node] }; } getHistory(): History {