mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 18:42:56 +00:00
feat: added export of propSymbol and prop classes
This commit is contained in:
parent
a42f538b06
commit
0e18feeb6e
@ -8,6 +8,7 @@ import {
|
||||
SettingPropEntry,
|
||||
SettingTopEntry,
|
||||
Selection,
|
||||
Prop,
|
||||
} from '@alilc/lowcode-shell';
|
||||
import { Node as InnerNode } from '@alilc/lowcode-designer';
|
||||
|
||||
@ -22,4 +23,5 @@ export default {
|
||||
SettingTopEntry,
|
||||
InnerNode,
|
||||
Selection,
|
||||
Prop,
|
||||
};
|
||||
|
||||
@ -9,6 +9,7 @@ import {
|
||||
settingPropEntrySymbol,
|
||||
settingTopEntrySymbol,
|
||||
designerCabinSymbol,
|
||||
propSymbol,
|
||||
} from '@alilc/lowcode-shell';
|
||||
|
||||
export default {
|
||||
@ -22,4 +23,5 @@ export default {
|
||||
settingPropEntrySymbol,
|
||||
settingTopEntrySymbol,
|
||||
designerCabinSymbol,
|
||||
propSymbol,
|
||||
};
|
||||
|
||||
@ -170,10 +170,16 @@ export class Material implements IPublicApiMaterial {
|
||||
* 监听 assets 变化的事件
|
||||
* @param fn
|
||||
*/
|
||||
onChangeAssets(fn: () => void) {
|
||||
// 设置 assets,经过 setAssets 赋值
|
||||
this[editorSymbol].onGot('assets', fn);
|
||||
// 增量设置 assets,经过 loadIncrementalAssets 赋值
|
||||
this[editorSymbol].eventBus.on('designer.incrementalAssetsReady', fn);
|
||||
onChangeAssets(fn: () => void): Function {
|
||||
const dispose = [
|
||||
// 设置 assets,经过 setAssets 赋值
|
||||
this[editorSymbol].onGot('assets', fn),
|
||||
// 增量设置 assets,经过 loadIncrementalAssets 赋值
|
||||
this[editorSymbol].eventBus.on('designer.incrementalAssetsReady', fn),
|
||||
];
|
||||
|
||||
return () => {
|
||||
dispose.forEach(d => d && d());
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,5 +104,5 @@ export interface IPublicApiMaterial {
|
||||
* add callback for assets changed event
|
||||
* @param fn
|
||||
*/
|
||||
onChangeAssets(fn: () => void): void;
|
||||
onChangeAssets(fn: () => void): Function;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user