mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-06-21 14:52:29 +00:00
21 lines
519 B
TypeScript
21 lines
519 B
TypeScript
import { ILowCodePluginContext } from '@alilc/lowcode-types';
|
|
|
|
export const componentMetaParser = (designer: any) => {
|
|
const fun = (ctx: ILowCodePluginContext) => {
|
|
return {
|
|
init() {
|
|
const { material } = ctx;
|
|
material.onChangeAssets(() => {
|
|
const assets = material.getAssets();
|
|
const { components = [] } = assets;
|
|
designer.buildComponentMetasMap(components);
|
|
});
|
|
},
|
|
};
|
|
};
|
|
|
|
fun.pluginName = '___component_meta_parser___';
|
|
|
|
return fun;
|
|
};
|