mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-13 20:36:34 +00:00
21 lines
527 B
TypeScript
21 lines
527 B
TypeScript
import { IPublicModelPluginContext } from '@alilc/lowcode-types';
|
|
|
|
export const componentMetaParser = (designer: any) => {
|
|
const fun = (ctx: IPublicModelPluginContext) => {
|
|
return {
|
|
init() {
|
|
const { material } = ctx;
|
|
material.onChangeAssets(() => {
|
|
const assets = material.getAssets();
|
|
const { components = [] } = assets;
|
|
designer.buildComponentMetasMap(components);
|
|
});
|
|
},
|
|
};
|
|
};
|
|
|
|
fun.pluginName = '___component_meta_parser___';
|
|
|
|
return fun;
|
|
};
|