mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 11:20:11 +00:00
feat(material): material apis add refreshComponentMetasMap function
This commit is contained in:
parent
2c38c5d9a0
commit
aef10fca0d
@ -245,6 +245,7 @@ material.getComponentMeta('Input');
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### getComponentMetasMap
|
#### getComponentMetasMap
|
||||||
|
|
||||||
获取所有已注册的物料元数据
|
获取所有已注册的物料元数据
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
@ -264,6 +265,15 @@ import { material } from '@alilc/lowcode-engine';
|
|||||||
material.getComponentMetasMap();
|
material.getComponentMetasMap();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### refreshComponentMetasMap
|
||||||
|
|
||||||
|
刷新 componentMetasMap,可触发模拟器里的 components 重新构建
|
||||||
|
|
||||||
|
**@since v1.1.7**
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
refreshComponentMetasMap(): void;
|
||||||
|
```
|
||||||
|
|
||||||
### 物料元数据管道函数
|
### 物料元数据管道函数
|
||||||
#### registerMetadataTransducer
|
#### registerMetadataTransducer
|
||||||
|
|||||||
@ -143,9 +143,16 @@ export class Material implements IPublicApiMaterial {
|
|||||||
* 在设计器辅助层增加一个扩展 action
|
* 在设计器辅助层增加一个扩展 action
|
||||||
* @param action
|
* @param action
|
||||||
*/
|
*/
|
||||||
addBuiltinComponentAction(action: IPublicTypeComponentAction) {
|
addBuiltinComponentAction = (action: IPublicTypeComponentAction) => {
|
||||||
this[designerSymbol].componentActions.addBuiltinComponentAction(action);
|
this[designerSymbol].componentActions.addBuiltinComponentAction(action);
|
||||||
}
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 刷新 componentMetasMap,可触发模拟器里的 components 重新构建
|
||||||
|
*/
|
||||||
|
refreshComponentMetasMap = () => {
|
||||||
|
this[designerSymbol].refreshComponentMetasMap();
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 移除设计器辅助层的指定 action
|
* 移除设计器辅助层的指定 action
|
||||||
|
|||||||
@ -122,4 +122,10 @@ export interface IPublicApiMaterial {
|
|||||||
* @param fn
|
* @param fn
|
||||||
*/
|
*/
|
||||||
onChangeAssets(fn: () => void): IPublicTypeDisposable;
|
onChangeAssets(fn: () => void): IPublicTypeDisposable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 刷新 componentMetasMap,可触发模拟器里的 components 重新构建
|
||||||
|
* @since v1.1.7
|
||||||
|
*/
|
||||||
|
refreshComponentMetasMap(): void;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user