forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetting-target.ts
More file actions
90 lines (72 loc) · 1.35 KB
/
setting-target.ts
File metadata and controls
90 lines (72 loc) · 1.35 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import { IEditor } from './editor';
export interface SettingTarget {
/**
* 同样类型的节点
*/
readonly isSameComponent: boolean;
/**
* 一个
*/
readonly isSingle: boolean;
/**
* 多个
*/
readonly isMultiple: boolean;
/**
* 编辑器引用
*/
readonly editor: IEditor;
/**
* 访问路径
*/
readonly path: Array<string| number>;
/**
* 顶端
*/
readonly top: SettingTarget;
/**
* 父级
*/
readonly parent: SettingTarget;
/**
* 获取当前值
*/
getValue: () => any;
/**
* 设置当前值
*/
setValue: (value: any) => void;
/**
* 取得子项
*/
get: (propName: string | number) => SettingTarget | null;
/**
* 取得子项
*/
getProps?: () => SettingTarget;
/**
* 获取子项属性值
*/
getPropValue: (propName: string | number) => any;
/**
* 设置子项属性值
*/
setPropValue: (propName: string | number, value: any) => void;
/**
* 清除已设置值
*/
clearPropValue: (propName: string | number) => void;
/**
* 获取顶层附属属性值
*/
getExtraPropValue: (propName: string) => any;
/**
* 设置顶层附属属性值
*/
setExtraPropValue: (propName: string, value: any) => void;
// @todo 补充 node 定义
/**
* 获取 node 中的第一项
*/
getNode: () => any;
}