88 IPublicTypeDragNodeObject ,
99 IPublicTypeDragNodeDataObject ,
1010 IPublicModelDocumentModel ,
11- IPublicModelSelection ,
1211 IPublicModelHistory ,
1312 IPublicModelModalNodesManager ,
1413 IPublicModelNode ,
@@ -22,7 +21,7 @@ import { ISimulatorHost } from '../simulator';
2221import { ComponentMeta } from '../component-meta' ;
2322import { IDropLocation , Designer } from '../designer' ;
2423import { Node , insertChildren , insertChild , isNode , RootNode , INode } from './node/node' ;
25- import { Selection } from './selection' ;
24+ import { Selection , ISelection } from './selection' ;
2625import { History } from './history' ;
2726import { ModalNodesManager } from './node' ;
2827import { uniqueId , isPlainObject , compatStage , isJSExpression , isDOMText , isNodeSchema , isDragNodeObject , isDragNodeDataObject } from '@alilc/lowcode-utils' ;
@@ -35,10 +34,16 @@ export type GetDataType<T, NodeType> = T extends undefined
3534 ? R
3635 : any
3736 : T ;
38- export interface IDocumentModel extends IPublicModelDocumentModel {
37+
38+ export interface IDocumentModel extends Omit < IPublicModelDocumentModel , 'selection' > {
3939
4040 readonly designer : Designer ;
4141
42+ /**
43+ * 选区控制
44+ */
45+ readonly selection : ISelection ;
46+
4247 /**
4348 * 根据 id 获取节点
4449 */
@@ -59,7 +64,7 @@ export class DocumentModel implements IDocumentModel {
5964 /**
6065 * 选区控制
6166 */
62- readonly selection : IPublicModelSelection = new Selection ( this ) ;
67+ readonly selection : ISelection = new Selection ( this ) ;
6368
6469 /**
6570 * 操作记录控制
@@ -489,7 +494,6 @@ export class DocumentModel implements IDocumentModel {
489494 ) ;
490495 }
491496
492-
493497 /**
494498 * 切换激活,只有打开的才能激活
495499 * 不激活,打开之后切换到另外一个时发生,比如 tab 视图,切换到另外一个标签页
0 commit comments