forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindow.ts
More file actions
51 lines (39 loc) · 1.11 KB
/
window.ts
File metadata and controls
51 lines (39 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { ReactElement } from 'react';
import { IPublicTypeDisposable, IPublicTypeNodeSchema } from '../type';
import { IPublicModelResource } from './resource';
import { IPublicModelEditorView } from './editor-view';
export interface IPublicModelWindow<
Resource = IPublicModelResource
> {
/** 窗口 id */
id: string;
/** 窗口标题 */
title?: string;
/** 窗口 icon */
icon?: ReactElement;
/** 窗口资源类型 */
resource?: Resource;
/**
* 窗口当前视图
* @since v1.1.7
*/
currentEditorView: IPublicModelEditorView | null;
/**
* 窗口全部视图实例
* @since v1.1.7
*/
editorViews: IPublicModelEditorView[];
/** 当前窗口导入 schema */
importSchema(schema: IPublicTypeNodeSchema): void;
/** 修改当前窗口视图类型 */
changeViewType(viewName: string): void;
/** 调用当前窗口视图保存钩子 */
save(): Promise<any>;
/** 窗口视图变更事件 */
onChangeViewType(fn: (viewName: string) => void): IPublicTypeDisposable;
/**
* 窗口视图保存事件
* @since 1.1.7
*/
onSave(fn: () => void): IPublicTypeDisposable;
}