GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge branch 'develop' of github.com:alibaba/lowcode-engine into develop · BeckSun/lowcode-engine@1d6af0e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • designer/src/project
      • project.ts
    • renderer-core/src/hoc
      • leaf.tsx
    • shell/src
      • material.ts
      • project.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/designer/src/project/project.ts‎

Copy file name to clipboardExpand all lines: packages/designer/src/project/project.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { EventEmitter } from 'events';
22
import { obx, computed, makeObservable, action } from '@alilc/lowcode-editor-core';
33
import { Designer } from '../designer';
44
import { DocumentModel, isDocumentModel, isPageSchema } from '../document';
5-
import { ProjectSchema, RootSchema } from '@alilc/lowcode-types';
5+
import { ProjectSchema, RootSchema, TransformStage } from '@alilc/lowcode-types';
66
import { ISimulatorHost } from '../simulator';
77

88
export class Project {
@@ -52,12 +52,12 @@ export class Project {
5252
/**
5353
* 获取项目整体 schema
5454
*/
55-
getSchema(): ProjectSchema {
55+
getSchema(stage: TransformStage = TransformStage.Render): ProjectSchema {
5656
return {
5757
...this.data,
5858
// TODO: future change this filter
5959
componentsMap: this.currentDocument?.getComponentsMap(),
60-
componentsTree: this.documents.filter((doc) => !doc.isBlank()).map((doc) => doc.schema),
60+
componentsTree: this.documents.filter((doc) => !doc.isBlank()).map((doc) => doc.export(stage)),
6161
i18n: this.i18n,
6262
};
6363
}
Collapse file

‎packages/renderer-core/src/hoc/leaf.tsx‎

Copy file name to clipboardExpand all lines: packages/renderer-core/src/hoc/leaf.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export function leafWrapper(Comp: types.IBaseRenderComponent, {
238238
const {
239239
hidden = false,
240240
condition = true,
241-
} = this.leaf?.schema || {};
241+
} = this.leaf?.export(TransformStage.Render) || {};
242242
return {
243243
nodeChildren: null,
244244
childrenInState: false,
Collapse file

‎packages/shell/src/material.ts‎

Copy file name to clipboardExpand all lines: packages/shell/src/material.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export default class Material {
3434
* @param assets
3535
* @returns
3636
*/
37-
setAssets(assets: AssetsJson) {
38-
return this[editorSymbol].setAssets(assets);
37+
async setAssets(assets: AssetsJson) {
38+
return await this[editorSymbol].setAssets(assets);
3939
}
4040

4141
/**
Collapse file

‎packages/shell/src/project.ts‎

Copy file name to clipboardExpand all lines: packages/shell/src/project.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ export default class Project {
103103
* 导出 project
104104
* @returns
105105
*/
106-
exportSchema() {
107-
return this[projectSymbol].getSchema();
106+
exportSchema(stage: TransformStage = TransformStage.Render) {
107+
return this[projectSymbol].getSchema(stage);
108108
}
109109

110110
/**

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.