Skip to content

Commit 84ccf2c

Browse files
authored
chore: update render mode comment (#2353)
1 parent c930b1d commit 84ccf2c

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

packages/editor/src/browser/types.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,16 @@ export interface IEditorSideWidget<MetaData = any> {
8282
initialProps?: unknown;
8383
}
8484

85+
/**
86+
* 默认值: ONE_PER_GROUP
87+
* ONE_PER_RESOURCE - 每个资源只初始化一次组件
88+
* ONE_PER_GROUP - 每个资源在同个 Group 下只初始化一次组件
89+
* ONE_PER_WORKBENCH - 整个渲染过程复用同一个组件,即组件仅会初始化一次
90+
*/
8591
export enum EditorComponentRenderMode {
86-
ONE_PER_RESOURCE = 1, // 每个resource渲染一个新的
87-
ONE_PER_GROUP = 2, // 每个Group最多存在一个新的
88-
ONE_PER_WORKBENCH = 3, // 整个IDE只有一个, 视图会被重用
92+
ONE_PER_RESOURCE = 1,
93+
ONE_PER_GROUP = 2,
94+
ONE_PER_WORKBENCH = 3,
8995
}
9096

9197
/**

0 commit comments

Comments
 (0)