mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-15 18:58:11 +00:00
git commit -m 更新lowcode-editor-skeleton
This commit is contained in:
parent
521a0a1b41
commit
eff31183c1
@ -17,7 +17,7 @@
|
||||
"dependencies": {
|
||||
"@ali/lowcode-designer": "^0.9.31",
|
||||
"@ali/lowcode-editor-core": "^0.8.24",
|
||||
"@ali/lowcode-editor-skeleton": "^0.8.37",
|
||||
"@ali/lowcode-editor-skeleton": "^0.8.38-beta1",
|
||||
"@ali/lowcode-plugin-designer": "^0.9.31",
|
||||
"@ali/lowcode-plugin-outline-pane": "^0.8.37",
|
||||
"@ali/ve-i18n-util": "^2.0.0",
|
||||
|
||||
@ -41,19 +41,21 @@ const pages = Object.assign(project, {
|
||||
if (componentsTree[0]) {
|
||||
componentsTree[0].componentName = componentsTree[0].componentName || 'Page';
|
||||
// FIXME
|
||||
if (componentsTree[0].componentName === 'Page' ||
|
||||
componentsTree[0].componentName === 'Component') {
|
||||
if (componentsTree[0].componentName === 'Page' || componentsTree[0].componentName === 'Component') {
|
||||
componentsTree[0].lifeCycles = {};
|
||||
componentsTree[0].methods = {};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
project.load({
|
||||
version: '1.0.0',
|
||||
componentsMap: [],
|
||||
componentsTree,
|
||||
}, true);
|
||||
project.load(
|
||||
{
|
||||
version: '1.0.0',
|
||||
componentsMap: [],
|
||||
componentsTree,
|
||||
},
|
||||
true,
|
||||
);
|
||||
},
|
||||
addPage(data: OldPageData | RootSchema) {
|
||||
if (isPageDataV1(data)) {
|
||||
@ -90,18 +92,20 @@ const pages = Object.assign(project, {
|
||||
return project.onCurrentDocumentChange(fn);
|
||||
},
|
||||
toData() {
|
||||
return project.documents.map(doc => doc.toData());
|
||||
}
|
||||
return project.documents.map((doc) => doc.toData());
|
||||
},
|
||||
});
|
||||
|
||||
Object.defineProperty(pages, 'currentPage', {
|
||||
get() {
|
||||
return project.currentDocument;
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
|
||||
pages.onCurrentPageChange((page: DocumentModel) => {
|
||||
if (!page) { return; }
|
||||
if (!page) {
|
||||
return;
|
||||
}
|
||||
page.acceptRootNodeVisitor('NodeCache', (rootNode) => {
|
||||
const visitor: NodeCacheVisitor = page.getRootNodeVisitor('NodeCache');
|
||||
if (visitor) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user