fix: documentModel toData 方法

This commit is contained in:
xiaoxian.xlf 2020-05-05 19:22:17 +08:00
parent 8119c4c1bc
commit 1ea0d73d09

View File

@ -461,14 +461,16 @@ export class DocumentModel {
return config.checkNestingDown(parent, obj) && this.checkNestingUp(parent, obj); return config.checkNestingDown(parent, obj) && this.checkNestingUp(parent, obj);
} }
// ======= compatibles // ======= compatibles for vision
getRoot() { getRoot() {
return this.rootNode; return this.rootNode;
} }
/** // add toData
* vision toData() {
*/ return { componentsTree: [this.project?.currentDocument?.export()] };
}
getHistory(): History { getHistory(): History {
return this.history; return this.history;
} }