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 — feat: added export of propSymbol and prop classes · IFTrue/lowcode-engine@0e18fee

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages
    • engine/src/modules
      • classes.ts
      • symbols.ts
    • shell/src/api
      • material.ts
    • types/src/shell/api
      • material.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/engine/src/modules/classes.ts‎

Copy file name to clipboardExpand all lines: packages/engine/src/modules/classes.ts
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
SettingPropEntry,
99
SettingTopEntry,
1010
Selection,
11+
Prop,
1112
} from '@alilc/lowcode-shell';
1213
import { Node as InnerNode } from '@alilc/lowcode-designer';
1314

@@ -22,4 +23,5 @@ export default {
2223
SettingTopEntry,
2324
InnerNode,
2425
Selection,
26+
Prop,
2527
};
Collapse file

‎packages/engine/src/modules/symbols.ts‎

Copy file name to clipboardExpand all lines: packages/engine/src/modules/symbols.ts
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
settingPropEntrySymbol,
1010
settingTopEntrySymbol,
1111
designerCabinSymbol,
12+
propSymbol,
1213
} from '@alilc/lowcode-shell';
1314

1415
export default {
@@ -22,4 +23,5 @@ export default {
2223
settingPropEntrySymbol,
2324
settingTopEntrySymbol,
2425
designerCabinSymbol,
26+
propSymbol,
2527
};
Collapse file

‎packages/shell/src/api/material.ts‎

Copy file name to clipboardExpand all lines: packages/shell/src/api/material.ts
+11-5Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,16 @@ export class Material implements IPublicApiMaterial {
170170
* 监听 assets 变化的事件
171171
* @param fn
172172
*/
173-
onChangeAssets(fn: () => void) {
174-
// 设置 assets,经过 setAssets 赋值
175-
this[editorSymbol].onGot('assets', fn);
176-
// 增量设置 assets,经过 loadIncrementalAssets 赋值
177-
this[editorSymbol].eventBus.on('designer.incrementalAssetsReady', fn);
173+
onChangeAssets(fn: () => void): Function {
174+
const dispose = [
175+
// 设置 assets,经过 setAssets 赋值
176+
this[editorSymbol].onGot('assets', fn),
177+
// 增量设置 assets,经过 loadIncrementalAssets 赋值
178+
this[editorSymbol].eventBus.on('designer.incrementalAssetsReady', fn),
179+
];
180+
181+
return () => {
182+
dispose.forEach(d => d && d());
183+
};
178184
}
179185
}
Collapse file

‎packages/types/src/shell/api/material.ts‎

Copy file name to clipboardExpand all lines: packages/types/src/shell/api/material.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@ export interface IPublicApiMaterial {
104104
* add callback for assets changed event
105105
* @param fn
106106
*/
107-
onChangeAssets(fn: () => void): void;
107+
onChangeAssets(fn: () => void): Function;
108108
}

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.