feat: added export of propSymbol and prop classes

This commit is contained in:
liujuping 2023-02-01 21:41:57 +08:00 committed by 林熠
parent a42f538b06
commit 0e18feeb6e
4 changed files with 16 additions and 6 deletions

View File

@ -8,6 +8,7 @@ import {
SettingPropEntry, SettingPropEntry,
SettingTopEntry, SettingTopEntry,
Selection, Selection,
Prop,
} from '@alilc/lowcode-shell'; } from '@alilc/lowcode-shell';
import { Node as InnerNode } from '@alilc/lowcode-designer'; import { Node as InnerNode } from '@alilc/lowcode-designer';
@ -22,4 +23,5 @@ export default {
SettingTopEntry, SettingTopEntry,
InnerNode, InnerNode,
Selection, Selection,
Prop,
}; };

View File

@ -9,6 +9,7 @@ import {
settingPropEntrySymbol, settingPropEntrySymbol,
settingTopEntrySymbol, settingTopEntrySymbol,
designerCabinSymbol, designerCabinSymbol,
propSymbol,
} from '@alilc/lowcode-shell'; } from '@alilc/lowcode-shell';
export default { export default {
@ -22,4 +23,5 @@ export default {
settingPropEntrySymbol, settingPropEntrySymbol,
settingTopEntrySymbol, settingTopEntrySymbol,
designerCabinSymbol, designerCabinSymbol,
propSymbol,
}; };

View File

@ -170,10 +170,16 @@ export class Material implements IPublicApiMaterial {
* assets * assets
* @param fn * @param fn
*/ */
onChangeAssets(fn: () => void) { onChangeAssets(fn: () => void): Function {
// 设置 assets经过 setAssets 赋值 const dispose = [
this[editorSymbol].onGot('assets', fn); // 设置 assets经过 setAssets 赋值
// 增量设置 assets经过 loadIncrementalAssets 赋值 this[editorSymbol].onGot('assets', fn),
this[editorSymbol].eventBus.on('designer.incrementalAssetsReady', fn); // 增量设置 assets经过 loadIncrementalAssets 赋值
this[editorSymbol].eventBus.on('designer.incrementalAssetsReady', fn),
];
return () => {
dispose.forEach(d => d && d());
};
} }
} }

View File

@ -104,5 +104,5 @@ export interface IPublicApiMaterial {
* add callback for assets changed event * add callback for assets changed event
* @param fn * @param fn
*/ */
onChangeAssets(fn: () => void): void; onChangeAssets(fn: () => void): Function;
} }