Skip to content

Commit f956645

Browse files
LeoYuanliujuping
authored andcommitted
feat: add getComponentsMap() for DocumentModel
1 parent 031c7f2 commit f956645

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/shell/src/document-model.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,15 @@ export default class DocumentModel {
186186
this[documentSymbol].removeNode(idOrNode as any);
187187
}
188188

189+
/**
190+
* componentsMap of documentModel
191+
* @param extraComps
192+
* @returns
193+
*/
194+
getComponentsMap(extraComps?: string[]) {
195+
return this[documentSymbol].getComponentsMap(extraComps);
196+
}
197+
189198
/**
190199
* 当前 document 新增节点事件
191200
*/

0 commit comments

Comments
 (0)