File tree Expand file tree Collapse file tree 3 files changed +25
-2
lines changed
Expand file tree Collapse file tree 3 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,7 @@ material.getComponentMeta('Input');
245245```
246246
247247#### getComponentMetasMap
248+
248249获取所有已注册的物料元数据
249250
250251``` typescript
@@ -264,6 +265,15 @@ import { material } from '@alilc/lowcode-engine';
264265material .getComponentMetasMap ();
265266```
266267
268+ #### refreshComponentMetasMap
269+
270+ 刷新 componentMetasMap,可触发模拟器里的 components 重新构建
271+
272+ ** @since v1.1.7**
273+
274+ ``` typescript
275+ refreshComponentMetasMap (): void ;
276+ ```
267277
268278### 物料元数据管道函数
269279#### registerMetadataTransducer
Original file line number Diff line number Diff line change @@ -143,9 +143,16 @@ export class Material implements IPublicApiMaterial {
143143 * 在设计器辅助层增加一个扩展 action
144144 * @param action
145145 */
146- addBuiltinComponentAction ( action : IPublicTypeComponentAction ) {
146+ addBuiltinComponentAction = ( action : IPublicTypeComponentAction ) => {
147147 this [ designerSymbol ] . componentActions . addBuiltinComponentAction ( action ) ;
148- }
148+ } ;
149+
150+ /**
151+ * 刷新 componentMetasMap,可触发模拟器里的 components 重新构建
152+ */
153+ refreshComponentMetasMap = ( ) => {
154+ this [ designerSymbol ] . refreshComponentMetasMap ( ) ;
155+ } ;
149156
150157 /**
151158 * 移除设计器辅助层的指定 action
Original file line number Diff line number Diff line change @@ -122,4 +122,10 @@ export interface IPublicApiMaterial {
122122 * @param fn
123123 */
124124 onChangeAssets ( fn : ( ) => void ) : IPublicTypeDisposable ;
125+
126+ /**
127+ * 刷新 componentMetasMap,可触发模拟器里的 components 重新构建
128+ * @since v1.1.7
129+ */
130+ refreshComponentMetasMap ( ) : void ;
125131}
You can’t perform that action at this time.
0 commit comments