mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 03:01:16 +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,
|
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,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -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());
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user