Skip to content

Commit 505a640

Browse files
liujupingJackLian
authored andcommitted
docs: add setting-field and setting-prop-entry api docs
1 parent 1051150 commit 505a640

4 files changed

Lines changed: 423 additions & 7 deletions

File tree

docs/docs/api/model/node.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ sidebar_position: 1
254254

255255
`@type {IPublicModelSettingTopEntry}`
256256

257+
相关章节:[设置器顶层操作对象](./setting-top-entry)
258+
257259
相关类型:[IPublicModelSettingTopEntry](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/setting-top-entry.ts)
258260

259261
### visible
Lines changed: 340 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,340 @@
1+
---
2+
title: SettingField
3+
sidebar_position: 6
4+
---
5+
> **@types** [IPublicModelSettingField](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/setting-field.ts)<br/>
6+
7+
# 基本介绍
8+
9+
setter 设置器操作对象
10+
11+
# 属性
12+
13+
## isGroup
14+
15+
获取设置属性的 isGroup
16+
17+
`@type {boolean}`
18+
19+
20+
## id
21+
22+
获取设置属性的 id
23+
24+
`@type {string}`
25+
26+
## name
27+
28+
获取设置属性的 name
29+
30+
`@type {string | number | undefined}`
31+
32+
## key
33+
34+
获取设置属性的 key
35+
36+
`@type {string | number | undefined}`
37+
38+
## path
39+
40+
获取设置属性的 path
41+
42+
`@type {(string | number)[]}`
43+
44+
## title
45+
46+
获取设置属性的 title
47+
48+
`@type {string}`
49+
50+
## setter
51+
52+
获取设置属性的 setter
53+
54+
`@type {IPublicTypeSetterType | null}`
55+
56+
## expanded
57+
58+
获取设置属性的 expanded
59+
60+
`@type {boolean}`
61+
62+
## extraProps
63+
64+
获取设置属性的 extraProps
65+
66+
`@type {IPublicTypeFieldExtraProps}`
67+
68+
## props
69+
70+
`@type {IPublicModelSettingTopEntry}`
71+
72+
相关章节:[设置器顶层操作对象](./setting-top-entry)
73+
74+
相关类型:[IPublicModelSettingTopEntry](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/setting-top-entry.ts)
75+
76+
## node
77+
78+
获取设置属性对应的节点实例
79+
80+
`@type {IPublicModelNode | null}`
81+
82+
83+
## parent
84+
85+
获取设置属性的父设置属性
86+
87+
`@type {IPublicModelSettingTopEntry | IPublicModelSettingField}`
88+
89+
相关章节:[设置器顶层操作对象](./setting-top-entry)
90+
91+
相关类型:[IPublicModelSettingTopEntry](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/setting-top-entry.ts)
92+
93+
## top
94+
95+
获取顶级设置属性
96+
97+
`@type {IPublicModelSettingTopEntry}`
98+
99+
相关章节:[设置器顶层操作对象](./setting-top-entry)
100+
101+
相关类型:[IPublicModelSettingTopEntry](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/setting-top-entry.ts)
102+
103+
## isSettingField
104+
105+
是否是 SettingField 实例
106+
107+
`@type {boolean}`
108+
109+
## componentMeta
110+
111+
`@type {IPublicModelComponentMeta}`
112+
113+
相关类型:[IPublicModelComponentMeta](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/component-meta.ts)
114+
115+
## items
116+
117+
获取设置属性的 items
118+
119+
`@type {Array<IPublicModelSettingField | IPublicTypeCustomView>}`
120+
121+
相关类型:[IPublicTypeCustomView](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/custom-view.ts)
122+
123+
# 方法
124+
125+
## setKey
126+
127+
设置 key 值
128+
129+
```
130+
/**
131+
* 设置 key 值
132+
* @param key
133+
*/
134+
setKey(key: string | number): void;
135+
```
136+
137+
## setValue
138+
139+
设置值
140+
141+
```
142+
/**
143+
* 设置值
144+
* @param val 值
145+
*/
146+
setValue(val: IPublicTypeCompositeValue, extraOptions?: IPublicTypeSetValueOptions): void;
147+
```
148+
149+
相关类型:
150+
- [IPublicTypeCompositeValue](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/composite-value.ts)
151+
- [IPublicTypeSetValueOptions](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/set-value-options.ts)
152+
153+
## setPropValue
154+
155+
设置子级属性值
156+
157+
```
158+
/**
159+
* 设置子级属性值
160+
* @param propName 子属性名
161+
* @param value 值
162+
*/
163+
setPropValue(propName: string | number, value: any): void;
164+
```
165+
166+
## clearPropValue
167+
168+
清空指定属性值
169+
170+
```
171+
/**
172+
* 清空指定属性值
173+
* @param propName
174+
*/
175+
clearPropValue(propName: string | number): void;
176+
```
177+
178+
## getDefaultValue
179+
180+
获取配置的默认值
181+
182+
```
183+
/**
184+
* 获取配置的默认值
185+
* @returns
186+
*/
187+
getDefaultValue(): any;
188+
```
189+
190+
## getValue
191+
192+
获取值
193+
194+
```
195+
/**
196+
* 获取值
197+
* @returns
198+
*/
199+
getValue(): any;
200+
```
201+
202+
## getPropValue
203+
204+
获取子级属性值
205+
206+
```
207+
/**
208+
* 获取子级属性值
209+
* @param propName 子属性名
210+
* @returns
211+
*/
212+
getPropValue(propName: string | number): any;
213+
```
214+
215+
## getExtraPropValue
216+
217+
获取顶层附属属性值
218+
219+
```
220+
/**
221+
* 获取顶层附属属性值
222+
*/
223+
getExtraPropValue(propName: string): any;
224+
```
225+
226+
## setExtraPropValue
227+
228+
设置顶层附属属性值
229+
230+
```
231+
/**
232+
* 设置顶层附属属性值
233+
*/
234+
setExtraPropValue(propName: string, value: any): void;
235+
```
236+
237+
## getProps
238+
239+
获取设置属性集
240+
241+
```
242+
/**
243+
* 获取设置属性集
244+
* @returns
245+
*/
246+
getProps(): IPublicModelSettingTopEntry;
247+
```
248+
249+
相关章节:[设置器顶层操作对象](./setting-top-entry)
250+
251+
相关类型:[IPublicModelSettingTopEntry](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/model/setting-top-entry.ts)
252+
253+
## isUseVariable
254+
255+
是否绑定了变量
256+
257+
```
258+
/**
259+
* 是否绑定了变量
260+
* @returns
261+
*/
262+
isUseVariable(): boolean;
263+
```
264+
265+
## setUseVariable
266+
267+
设置绑定变量
268+
269+
```
270+
/**
271+
* 设置绑定变量
272+
* @param flag
273+
*/
274+
setUseVariable(flag: boolean): void;
275+
```
276+
277+
## createField
278+
279+
创建一个设置 field 实例
280+
281+
```
282+
/**
283+
* 创建一个设置 field 实例
284+
* @param config
285+
* @returns
286+
*/
287+
createField(config: IPublicTypeFieldConfig): IPublicModelSettingField;
288+
```
289+
290+
相关类型:[IPublicTypeFieldConfig](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/field-config.ts)
291+
292+
## getMockOrValue
293+
294+
获取值,当为变量时,返回 mock
295+
296+
```
297+
/**
298+
* 获取值,当为变量时,返回 mock
299+
* @returns
300+
*/
301+
getMockOrValue(): any;
302+
303+
```
304+
305+
## purge
306+
307+
销毁当前 field 实例
308+
309+
```
310+
/**
311+
* 销毁当前 field 实例
312+
*/
313+
purge(): void;
314+
```
315+
316+
## remove
317+
318+
移除当前 field 实例
319+
320+
```
321+
/**
322+
* 移除当前 field 实例
323+
*/
324+
remove(): void;
325+
```
326+
327+
## onEffect
328+
329+
设置 autorun
330+
331+
```
332+
/**
333+
* 设置 autorun
334+
* @param action
335+
* @returns
336+
*/
337+
onEffect(action: () => void): IPublicTypeDisposable;
338+
```
339+
340+
相关类型:[IPublicTypeDisposable](https://github.com/alibaba/lowcode-engine/blob/main/packages/types/src/shell/type/disposable.ts)

0 commit comments

Comments
 (0)