forked from alibaba/lowcode-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprop.ts
More file actions
72 lines (61 loc) · 1.35 KB
/
prop.ts
File metadata and controls
72 lines (61 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
import { IPublicEnumTransformStage } from '../enum';
import { IPublicTypeCompositeValue } from '../type';
import { IPublicModelNode } from './';
export interface IPublicModelProp<
Node = IPublicModelNode
> {
/**
* id
*/
get id(): string;
/**
* key 值
* get key of prop
*/
get key(): string | number | undefined;
/**
* 返回当前 prop 的路径
* get path of current prop
*/
get path(): string[];
/**
* 返回所属的节点实例
* get node instance, which this prop belongs to
*/
get node(): Node | null;
/**
* 当本 prop 代表一个 Slot 时,返回对应的 slotNode
* return the slot node (only if the current prop represents a slot)
* @since v1.1.0
*/
get slotNode(): Node | undefined | null;
/**
* 是否是 Prop , 固定返回 true
* check if it is a prop or not, and of course always return true
* @experimental
*/
get isProp(): boolean;
/**
* 设置值
* set value for this prop
* @param val
*/
setValue(val: IPublicTypeCompositeValue): void;
/**
* 获取值
* get value of this prop
*/
getValue(): any;
/**
* 移除值
* remove value of this prop
* @since v1.0.16
*/
remove(): void;
/**
* 导出值
* export schema
* @param stage
*/
exportSchema(stage: IPublicEnumTransformStage): IPublicTypeCompositeValue;
}