@cloudbase/cals 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/parser/cals/index.d.ts.map +1 -1
- package/lib/cjs/parser/cals/index.js +2 -1
- package/lib/cjs/parser/cals/utils/block/index.d.ts +2 -2
- package/lib/cjs/parser/cals/utils/block/index.d.ts.map +1 -1
- package/lib/cjs/parser/cals/utils/template.d.ts.map +1 -1
- package/lib/cjs/parser/cals/utils/template.js +2 -0
- package/lib/cjs/types/index.d.ts +1 -1
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/cjs/types/index.js +2 -13
- package/lib/cjs/types/lcds.d.ts +530 -528
- package/lib/cjs/types/lcds.d.ts.map +1 -1
- package/lib/cjs/types/lcds.js +29 -20
- package/lib/cjs/types/platform/app.d.ts +3 -1
- package/lib/cjs/types/platform/app.d.ts.map +1 -1
- package/lib/cjs/types/platform/theme.d.ts +2 -2
- package/lib/cjs/types/platform/theme.d.ts.map +1 -1
- package/lib/cjs/utils/dts/auto-generated.d.ts +1 -1
- package/lib/cjs/utils/dts/auto-generated.d.ts.map +1 -1
- package/lib/cjs/utils/dts/auto-generated.js +113 -0
- package/lib/cjs/utils/version/migrations/version4.js +4 -1
- package/lib/esm/parser/cals/index.d.ts.map +1 -1
- package/lib/esm/parser/cals/index.js +2 -1
- package/lib/esm/parser/cals/utils/block/index.d.ts +2 -2
- package/lib/esm/parser/cals/utils/block/index.d.ts.map +1 -1
- package/lib/esm/parser/cals/utils/template.d.ts.map +1 -1
- package/lib/esm/parser/cals/utils/template.js +2 -0
- package/lib/esm/types/index.d.ts +1 -1
- package/lib/esm/types/index.d.ts.map +1 -1
- package/lib/esm/types/index.js +1 -1
- package/lib/esm/types/lcds.d.ts +530 -528
- package/lib/esm/types/lcds.d.ts.map +1 -1
- package/lib/esm/types/lcds.js +28 -19
- package/lib/esm/types/platform/app.d.ts +3 -1
- package/lib/esm/types/platform/app.d.ts.map +1 -1
- package/lib/esm/types/platform/theme.d.ts +2 -2
- package/lib/esm/types/platform/theme.d.ts.map +1 -1
- package/lib/esm/utils/dts/auto-generated.d.ts +1 -1
- package/lib/esm/utils/dts/auto-generated.d.ts.map +1 -1
- package/lib/esm/utils/dts/auto-generated.js +113 -0
- package/lib/esm/utils/version/migrations/version4.js +4 -1
- package/lib/schema/lcds_component.json +1 -1
- package/lib/schema/platform_application.json +1 -1
- package/lib/schema/platform_template.json +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/lib/esm/types/lcds.d.ts
CHANGED
|
@@ -1,610 +1,612 @@
|
|
|
1
1
|
import type { IPlatformComponent } from './platform/component';
|
|
2
|
-
|
|
3
|
-
* 低码组件库开发规范 (LCDS, Lowcode Components Development Specification)
|
|
4
|
-
*
|
|
5
|
-
* 基于 LCDS 开发的组件库, 可以在云开发低码平台内使用
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* 低码的平台方法的开发配置
|
|
9
|
-
*/
|
|
10
|
-
export interface IAction {
|
|
2
|
+
export declare namespace LCDS {
|
|
11
3
|
/**
|
|
12
|
-
*
|
|
13
|
-
* @maxLength 214
|
|
14
|
-
* @minLength 1
|
|
15
|
-
*/
|
|
16
|
-
name?: string;
|
|
17
|
-
/**
|
|
18
|
-
* 选填, 平台方法可以接收的数据
|
|
19
|
-
* 需要符合 JSON SCHEMA 规范
|
|
20
|
-
* @default {}
|
|
21
|
-
*/
|
|
22
|
-
data?: any;
|
|
23
|
-
/**
|
|
24
|
-
* 选填, 组件对外开放的只读属性,可通过 $w.id1.xx 获取
|
|
25
|
-
* 需要符合 JSON SCHEMA 规范
|
|
26
|
-
*/
|
|
27
|
-
properties?: any;
|
|
28
|
-
/**
|
|
29
|
-
* 选填, 平台方法适配的平台
|
|
4
|
+
* 低码组件库开发规范 (LCDS, Lowcode Components Development Specification)
|
|
30
5
|
*
|
|
31
|
-
*
|
|
6
|
+
* 基于 LCDS 开发的组件库, 可以在云开发低码平台内使用
|
|
32
7
|
*/
|
|
33
|
-
platforms?: string[];
|
|
34
8
|
/**
|
|
35
|
-
*
|
|
9
|
+
* 低码的平台方法的开发配置
|
|
36
10
|
*/
|
|
37
|
-
|
|
11
|
+
export interface IAction {
|
|
38
12
|
/**
|
|
39
|
-
* 选填,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* 选填, 平台方法的简介, 建议用中文
|
|
44
|
-
*/
|
|
45
|
-
description?: string;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* 选填, 扩展字段, 尽量避免用
|
|
49
|
-
*/
|
|
50
|
-
extra?: any;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* 低码组件开发配置
|
|
54
|
-
*/
|
|
55
|
-
export interface IComponent {
|
|
56
|
-
/**
|
|
57
|
-
* 选填, 组件唯一标识
|
|
58
|
-
* @maxLength 214
|
|
59
|
-
* @minLength 1
|
|
60
|
-
*/
|
|
61
|
-
name?: string;
|
|
62
|
-
/**
|
|
63
|
-
* 选填, 组件可以接收的数据, 用作组件props入参
|
|
64
|
-
* 需要符合 JSON SCHEMA 规范
|
|
65
|
-
* @default {}
|
|
66
|
-
*/
|
|
67
|
-
data?: any;
|
|
68
|
-
/**
|
|
69
|
-
* 选填, 组件可以被捕获的事件信息
|
|
70
|
-
* @default []
|
|
71
|
-
*/
|
|
72
|
-
events?: IEvent[];
|
|
73
|
-
/**
|
|
74
|
-
* 选填,组件样式 API
|
|
75
|
-
*/
|
|
76
|
-
classes?: IClasses[];
|
|
77
|
-
/**
|
|
78
|
-
* 选填,组件属性 API, Object 类型 json schema
|
|
79
|
-
*/
|
|
80
|
-
properties?: any;
|
|
81
|
-
/**
|
|
82
|
-
* 选填,组件内定义的自定义方法
|
|
83
|
-
* @default []
|
|
84
|
-
*/
|
|
85
|
-
methods?: IMethod[];
|
|
86
|
-
/**
|
|
87
|
-
* 选填, 组件需要在运行时获取的配置项
|
|
88
|
-
* @deprecated
|
|
89
|
-
*/
|
|
90
|
-
compConfig?: {
|
|
91
|
-
/**
|
|
92
|
-
* 选填, 组件是否开启数据容器功能
|
|
93
|
-
* - 默认为 false
|
|
94
|
-
* - 设置为 true 后,在组件内可通过调用 `onDataChange` 事件将内部数据挂载到组件的 `$context` 上下文对象
|
|
95
|
-
*/
|
|
96
|
-
isDataContainer?: boolean;
|
|
97
|
-
/**
|
|
98
|
-
* 选填, 组件类型
|
|
99
|
-
*
|
|
100
|
-
* 支持将表单类组件设置为 `formField`,即可在表单容器中收集值
|
|
101
|
-
*/
|
|
102
|
-
componentType?: string;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* 选填, 组件适配的平台
|
|
106
|
-
*
|
|
107
|
-
* 如果该字段为空, 则进行智能推断
|
|
108
|
-
*/
|
|
109
|
-
platforms?: string[];
|
|
110
|
-
/**
|
|
111
|
-
* 选填, 仅用于在低码平台的信息展示
|
|
112
|
-
*/
|
|
113
|
-
meta?: {
|
|
114
|
-
/**
|
|
115
|
-
* 选填, 组件英文标识
|
|
13
|
+
* 选填, 平台方法的唯一标识
|
|
14
|
+
* @maxLength 214
|
|
15
|
+
* @minLength 1
|
|
116
16
|
*/
|
|
117
17
|
name?: string;
|
|
118
18
|
/**
|
|
119
|
-
* 选填,
|
|
19
|
+
* 选填, 平台方法可以接收的数据
|
|
20
|
+
* 需要符合 JSON SCHEMA 规范
|
|
21
|
+
* @default {}
|
|
120
22
|
*/
|
|
121
|
-
|
|
23
|
+
data?: any;
|
|
122
24
|
/**
|
|
123
|
-
* 选填,
|
|
25
|
+
* 选填, 组件对外开放的只读属性,可通过 $w.id1.xx 获取
|
|
26
|
+
* 需要符合 JSON SCHEMA 规范
|
|
124
27
|
*/
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* 选填, 组件简介, 建议用中文
|
|
128
|
-
*/
|
|
129
|
-
description?: string;
|
|
28
|
+
properties?: any;
|
|
130
29
|
/**
|
|
131
|
-
* 选填,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* 选填, 组件大图标 (组件列表里用的)
|
|
30
|
+
* 选填, 平台方法适配的平台
|
|
31
|
+
*
|
|
32
|
+
* 如果该字段为空, 则进行智能推断
|
|
136
33
|
*/
|
|
137
|
-
|
|
34
|
+
platforms?: string[];
|
|
138
35
|
/**
|
|
139
|
-
*
|
|
36
|
+
* 选填, 仅用于在低码平台的信息展示
|
|
140
37
|
*/
|
|
141
|
-
|
|
38
|
+
meta?: {
|
|
39
|
+
/**
|
|
40
|
+
* 选填, 平台方法的别名, 建议用中文
|
|
41
|
+
*/
|
|
42
|
+
title?: string;
|
|
43
|
+
/**
|
|
44
|
+
* 选填, 平台方法的简介, 建议用中文
|
|
45
|
+
*/
|
|
46
|
+
description?: string;
|
|
47
|
+
};
|
|
142
48
|
/**
|
|
143
|
-
* 选填,
|
|
144
|
-
* @minimum 1
|
|
145
|
-
* @maximum 10000
|
|
49
|
+
* 选填, 扩展字段, 尽量避免用
|
|
146
50
|
*/
|
|
147
|
-
|
|
51
|
+
extra?: any;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* 低码组件开发配置
|
|
55
|
+
*/
|
|
56
|
+
export interface IComponent {
|
|
148
57
|
/**
|
|
149
|
-
* 选填,
|
|
58
|
+
* 选填, 组件唯一标识
|
|
59
|
+
* @maxLength 214
|
|
60
|
+
* @minLength 1
|
|
150
61
|
*/
|
|
151
|
-
|
|
62
|
+
name?: string;
|
|
152
63
|
/**
|
|
153
|
-
* 选填,
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
* - `[]` 表示隐藏
|
|
157
|
-
* - `['APP']` 表示只在应用编辑器显示
|
|
158
|
-
* - `['COMPONENT']` 表示只在组件编辑器显示
|
|
64
|
+
* 选填, 组件可以接收的数据, 用作组件props入参
|
|
65
|
+
* 需要符合 JSON SCHEMA 规范
|
|
66
|
+
* @default {}
|
|
159
67
|
*/
|
|
160
|
-
|
|
68
|
+
data?: any;
|
|
161
69
|
/**
|
|
162
|
-
*
|
|
163
|
-
*
|
|
70
|
+
* 选填, 组件可以被捕获的事件信息
|
|
71
|
+
* @default []
|
|
164
72
|
*/
|
|
165
|
-
|
|
73
|
+
events?: IEvent[];
|
|
166
74
|
/**
|
|
167
|
-
*
|
|
168
|
-
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002411487 使用文档}
|
|
75
|
+
* 选填,组件样式 API
|
|
169
76
|
*/
|
|
170
|
-
|
|
77
|
+
classes?: IClasses[];
|
|
171
78
|
/**
|
|
172
|
-
*
|
|
173
|
-
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002411487 使用文档}
|
|
79
|
+
* 选填,组件属性 API, Object 类型 json schema
|
|
174
80
|
*/
|
|
175
|
-
|
|
81
|
+
properties?: any;
|
|
176
82
|
/**
|
|
177
|
-
*
|
|
83
|
+
* 选填,组件内定义的自定义方法
|
|
84
|
+
* @default []
|
|
178
85
|
*/
|
|
179
|
-
|
|
86
|
+
methods?: IMethod[];
|
|
180
87
|
/**
|
|
181
|
-
* 选填,
|
|
88
|
+
* 选填, 组件需要在运行时获取的配置项
|
|
89
|
+
* @deprecated
|
|
182
90
|
*/
|
|
183
|
-
|
|
91
|
+
compConfig?: {
|
|
92
|
+
/**
|
|
93
|
+
* 选填, 组件是否开启数据容器功能
|
|
94
|
+
* - 默认为 false
|
|
95
|
+
* - 设置为 true 后,在组件内可通过调用 `onDataChange` 事件将内部数据挂载到组件的 `$context` 上下文对象
|
|
96
|
+
*/
|
|
97
|
+
isDataContainer?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* 选填, 组件类型
|
|
100
|
+
*
|
|
101
|
+
* 支持将表单类组件设置为 `formField`,即可在表单容器中收集值
|
|
102
|
+
*/
|
|
103
|
+
componentType?: string;
|
|
104
|
+
};
|
|
184
105
|
/**
|
|
185
|
-
*
|
|
106
|
+
* 选填, 组件适配的平台
|
|
186
107
|
*
|
|
187
|
-
*
|
|
188
|
-
* @deprecated
|
|
108
|
+
* 如果该字段为空, 则进行智能推断
|
|
189
109
|
*/
|
|
190
|
-
|
|
191
|
-
[key: string]: any;
|
|
192
|
-
};
|
|
110
|
+
platforms?: string[];
|
|
193
111
|
/**
|
|
194
|
-
*
|
|
195
|
-
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002466153 使用文档}
|
|
112
|
+
* 选填, 仅用于在低码平台的信息展示
|
|
196
113
|
*/
|
|
197
|
-
|
|
114
|
+
meta?: {
|
|
115
|
+
/**
|
|
116
|
+
* 选填, 组件英文标识
|
|
117
|
+
*/
|
|
118
|
+
name?: string;
|
|
119
|
+
/**
|
|
120
|
+
* 选填, 用于生成组件 id 的前缀标识
|
|
121
|
+
*/
|
|
122
|
+
componentName?: string;
|
|
123
|
+
/**
|
|
124
|
+
* 选填, 组件别名, 建议用中文
|
|
125
|
+
*/
|
|
126
|
+
title?: string;
|
|
127
|
+
/**
|
|
128
|
+
* 选填, 组件简介, 建议用中文
|
|
129
|
+
*/
|
|
130
|
+
description?: string;
|
|
131
|
+
/**
|
|
132
|
+
* 选填, 组件图标, 支持本地图片(大纲树里面用的)
|
|
133
|
+
*/
|
|
134
|
+
icon?: string;
|
|
135
|
+
/**
|
|
136
|
+
* 选填, 组件大图标 (组件列表里用的)
|
|
137
|
+
*/
|
|
138
|
+
figureIcon?: string;
|
|
139
|
+
/**
|
|
140
|
+
* 必填, 组件分类, 建议用中文
|
|
141
|
+
*/
|
|
142
|
+
category: string;
|
|
143
|
+
/**
|
|
144
|
+
* 选填, 组件的排序权重
|
|
145
|
+
* @minimum 1
|
|
146
|
+
* @maximum 10000
|
|
147
|
+
*/
|
|
148
|
+
componentOrder?: number;
|
|
149
|
+
/**
|
|
150
|
+
* 选填, 组件生效的平台
|
|
151
|
+
*/
|
|
152
|
+
platform?: XPlatform[];
|
|
198
153
|
/**
|
|
199
|
-
*
|
|
154
|
+
* 选填, 组件可见性配置
|
|
155
|
+
*
|
|
156
|
+
* 默认均显示
|
|
157
|
+
* - `[]` 表示隐藏
|
|
158
|
+
* - `['APP']` 表示只在应用编辑器显示
|
|
159
|
+
* - `['COMPONENT']` 表示只在组件编辑器显示
|
|
160
|
+
*/
|
|
161
|
+
visible?: VisibleItem[];
|
|
162
|
+
/**
|
|
163
|
+
* 选填,组件模板配置
|
|
164
|
+
* {@link https://tapd.woa.com/20422223/prong/stories/view/1020422223884227747 使用文档}
|
|
165
|
+
*/
|
|
166
|
+
templates?: ITemplate[];
|
|
167
|
+
/**
|
|
168
|
+
* 选填, 标识旧组件废弃,控制单组件升级按钮显隐
|
|
169
|
+
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002411487 使用文档}
|
|
170
|
+
*/
|
|
171
|
+
deprecated?: boolean;
|
|
172
|
+
/**
|
|
173
|
+
* 选填, 单组件渲染模式[升级/替换]
|
|
174
|
+
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002411487 使用文档}
|
|
175
|
+
*/
|
|
176
|
+
renderMode?: IRenderMode[];
|
|
177
|
+
/**
|
|
178
|
+
* 选填, 组件说明文档的地址
|
|
179
|
+
*/
|
|
180
|
+
docsUrl?: string;
|
|
181
|
+
/**
|
|
182
|
+
* 选填, 组件快捷编辑协议
|
|
200
183
|
*/
|
|
201
|
-
|
|
184
|
+
shortcut?: IShortcut;
|
|
185
|
+
/**
|
|
186
|
+
* 选填,组件上下文协议
|
|
187
|
+
*
|
|
188
|
+
* 配置后可通过 `$context.id.state.xx` 读取属性值
|
|
189
|
+
* @deprecated
|
|
190
|
+
*/
|
|
191
|
+
contextData?: {
|
|
192
|
+
[key: string]: any;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* 选填,组件相对位置限制
|
|
196
|
+
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002466153 使用文档}
|
|
197
|
+
*/
|
|
198
|
+
positionConstraint?: {
|
|
202
199
|
/**
|
|
203
|
-
*
|
|
200
|
+
* 可选,允许子组件类型
|
|
204
201
|
*/
|
|
205
|
-
|
|
202
|
+
allowChildren?: {
|
|
203
|
+
/**
|
|
204
|
+
* 组件对应类型,对应 `componentConfig.componentType`
|
|
205
|
+
*/
|
|
206
|
+
componentType: string;
|
|
207
|
+
/**
|
|
208
|
+
* 是否允许为隔代子组件
|
|
209
|
+
*/
|
|
210
|
+
recursive?: boolean;
|
|
211
|
+
/**
|
|
212
|
+
* 用户犯错提示
|
|
213
|
+
*/
|
|
214
|
+
tip?: string;
|
|
215
|
+
}[];
|
|
206
216
|
/**
|
|
207
|
-
*
|
|
217
|
+
* 可选,允许父组件类型
|
|
208
218
|
*/
|
|
209
|
-
|
|
219
|
+
allowParent?: {
|
|
220
|
+
/**
|
|
221
|
+
* 组件对应类型,对应` componentConfig.componentType`
|
|
222
|
+
*/
|
|
223
|
+
componentType: string;
|
|
224
|
+
/**
|
|
225
|
+
* 是否允许为隔代父组件
|
|
226
|
+
*/
|
|
227
|
+
recursive: boolean;
|
|
228
|
+
/**
|
|
229
|
+
* 用户犯错提示
|
|
230
|
+
*/
|
|
231
|
+
tip?: string;
|
|
232
|
+
}[];
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* 选填,搜索关键词
|
|
236
|
+
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002460167 使用文档}
|
|
237
|
+
*/
|
|
238
|
+
keyWords?: string[];
|
|
239
|
+
/**
|
|
240
|
+
* 选填,属性面板提示,支持 markdown
|
|
241
|
+
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002460139 使用文档}
|
|
242
|
+
*/
|
|
243
|
+
propertyPanelTips?: string;
|
|
244
|
+
/**
|
|
245
|
+
* 选填,样式面板提示
|
|
246
|
+
*/
|
|
247
|
+
stylePanelTips?: string;
|
|
248
|
+
/**
|
|
249
|
+
* 选填,禁用升级应用内所有的组件
|
|
250
|
+
*/
|
|
251
|
+
disableUpgradeAll?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* 选填,检查功能
|
|
254
|
+
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002459983 使用文档}
|
|
255
|
+
*/
|
|
256
|
+
validate?: {
|
|
210
257
|
/**
|
|
211
|
-
*
|
|
258
|
+
* 规则名称
|
|
212
259
|
*/
|
|
213
|
-
|
|
260
|
+
rule: string;
|
|
261
|
+
options?: {
|
|
262
|
+
/**
|
|
263
|
+
* 标题,支持 markdown
|
|
264
|
+
*/
|
|
265
|
+
title: string;
|
|
266
|
+
/**
|
|
267
|
+
* 描述,支持 markdown
|
|
268
|
+
*/
|
|
269
|
+
description: string;
|
|
270
|
+
/**
|
|
271
|
+
* 类型
|
|
272
|
+
*/
|
|
273
|
+
type: string;
|
|
274
|
+
/**
|
|
275
|
+
* 名称
|
|
276
|
+
*/
|
|
277
|
+
name?: string;
|
|
278
|
+
/**
|
|
279
|
+
* 标签
|
|
280
|
+
*/
|
|
281
|
+
label?: string;
|
|
282
|
+
/**
|
|
283
|
+
* 提示
|
|
284
|
+
*/
|
|
285
|
+
tooltip?: string;
|
|
286
|
+
/**
|
|
287
|
+
* 选填,版本,版本,支持 markdown
|
|
288
|
+
*/
|
|
289
|
+
version?: string;
|
|
290
|
+
/**
|
|
291
|
+
* 可选,是否允许失败
|
|
292
|
+
*/
|
|
293
|
+
allowFailure?: boolean;
|
|
294
|
+
/**
|
|
295
|
+
* 可选,限制当前选中平台,不填不限制,默认为 null
|
|
296
|
+
*/
|
|
297
|
+
matchedSelectedPlatform?: ('h5' | 'miniprogram' | 'pc')[];
|
|
298
|
+
/**
|
|
299
|
+
* 可选,限制当前发布平台,不填不限制,默认为 'all'
|
|
300
|
+
*/
|
|
301
|
+
matchedPublishedPlatform?: ('web' | 'miniprogram' | 'all')[];
|
|
302
|
+
/**
|
|
303
|
+
* 特殊字段,因 rule 的不同而不同
|
|
304
|
+
*/
|
|
305
|
+
extra?: any;
|
|
306
|
+
action?: {
|
|
307
|
+
[key: string]: any;
|
|
308
|
+
};
|
|
309
|
+
[k: string]: unknown;
|
|
310
|
+
};
|
|
214
311
|
}[];
|
|
215
312
|
/**
|
|
216
|
-
*
|
|
313
|
+
* 选填,样式配置属性屏蔽
|
|
314
|
+
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002470249 使用文档}
|
|
315
|
+
*/
|
|
316
|
+
inlineStyleForm?: {
|
|
317
|
+
[key: string]: {
|
|
318
|
+
visible: boolean;
|
|
319
|
+
} | boolean;
|
|
320
|
+
} | {
|
|
321
|
+
$blockedAll: true;
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* 选填,属性分组信息
|
|
325
|
+
*/
|
|
326
|
+
group?: {
|
|
327
|
+
[key: string]: {
|
|
328
|
+
'x-index': number;
|
|
329
|
+
expand: boolean;
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
/**
|
|
333
|
+
* 组件使用示例缩略图
|
|
217
334
|
*/
|
|
218
|
-
|
|
335
|
+
previewImageUrl?: string;
|
|
336
|
+
/**
|
|
337
|
+
* 组件类型
|
|
338
|
+
*/
|
|
339
|
+
componentType?: string;
|
|
340
|
+
/**
|
|
341
|
+
* preview 配置按钮
|
|
342
|
+
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002676991 使用文档}
|
|
343
|
+
*/
|
|
344
|
+
previewOperation?: {
|
|
219
345
|
/**
|
|
220
|
-
*
|
|
346
|
+
* 选填,头部图标
|
|
221
347
|
*/
|
|
222
|
-
|
|
348
|
+
headerIcon?: string;
|
|
223
349
|
/**
|
|
224
|
-
*
|
|
350
|
+
* 操作配置
|
|
225
351
|
*/
|
|
226
|
-
|
|
352
|
+
operation: {
|
|
353
|
+
/** 图标 */
|
|
354
|
+
icon: string;
|
|
355
|
+
/** 标题 */
|
|
356
|
+
title: string;
|
|
357
|
+
/** 行为,由编辑器提供 */
|
|
358
|
+
action: string;
|
|
359
|
+
}[];
|
|
227
360
|
/**
|
|
228
|
-
*
|
|
361
|
+
* 操作区域会插入的插槽名称
|
|
229
362
|
*/
|
|
230
|
-
|
|
231
|
-
|
|
363
|
+
previewSlotName?: string;
|
|
364
|
+
/**
|
|
365
|
+
* 选填,插入插槽名称
|
|
366
|
+
*
|
|
367
|
+
* - 指定拖动时插入的插槽名称
|
|
368
|
+
* - 比如 指定为 `contentSlot`,如果 `form` 指定了值为 `contentSlot`,则会插入到 `contentSlot` 中,而不是 `form` 里
|
|
369
|
+
*/
|
|
370
|
+
insertSlotName?: string;
|
|
371
|
+
};
|
|
372
|
+
queryGeneratorConfig?: {
|
|
373
|
+
sceneConfig: {
|
|
374
|
+
scenes: Array<Scene>;
|
|
375
|
+
availableScenes: Array<Scene>;
|
|
376
|
+
validCombinations: Array<Scene[]>;
|
|
377
|
+
enableSelectMultiple?: boolean;
|
|
378
|
+
};
|
|
379
|
+
fieldsConfig?: {
|
|
380
|
+
/** 是否支持配置 format? */
|
|
381
|
+
enableConfigFormat?: boolean;
|
|
382
|
+
/** 是否显示字段标识的列? */
|
|
383
|
+
showFieldTypeColumn?: boolean;
|
|
384
|
+
enableSelectFieldFormType?: boolean;
|
|
385
|
+
};
|
|
386
|
+
apisConfig?: {
|
|
387
|
+
/** 是否配置 record 和 total 的键值? */
|
|
388
|
+
enableConfigRecordAndTotalKey: boolean;
|
|
389
|
+
};
|
|
390
|
+
mysqlConfig?: {
|
|
391
|
+
/** 是否自动生成查询总条数语句? */
|
|
392
|
+
autoGenerateCountQuery?: boolean;
|
|
393
|
+
/**
|
|
394
|
+
* 计数名字
|
|
395
|
+
*
|
|
396
|
+
* 表示 `SELECT COUNT(*) as count FROM xxx;` 的 `count`,如果指定 `countName` 为 `abc`,则输出 `sql SELECT COUNT(*) as abc FROM xxx;`
|
|
397
|
+
*/
|
|
398
|
+
countName?: string;
|
|
399
|
+
};
|
|
400
|
+
/**
|
|
401
|
+
* 绑定路径配置
|
|
402
|
+
*
|
|
403
|
+
* 如果没有配置,默认就是 `params`,举例说明:
|
|
404
|
+
* - 配置 `select.condition` 为 `'params.abc'`,则输出的 SQL 为 `SELECT aa FROM xxx WHERE key={{params.abc}}`
|
|
405
|
+
* - 配置 `create.value` 为 `'params.hello'`,则输出的 SQL 为 `INSERT INTO xxx (a, b) VALUES ({{params.hello.a}}, {{params.hello.b }})`
|
|
406
|
+
*/
|
|
407
|
+
bindParamsPath?: Partial<Record<Scene, Partial<Record<SceneTarget, string>>>>;
|
|
408
|
+
quickOperateButton?: {
|
|
409
|
+
icon: string;
|
|
410
|
+
targetField: string;
|
|
411
|
+
content: string;
|
|
412
|
+
}[];
|
|
413
|
+
};
|
|
414
|
+
globalConfig?: {
|
|
415
|
+
[key: string]: any;
|
|
416
|
+
};
|
|
232
417
|
};
|
|
233
418
|
/**
|
|
234
|
-
*
|
|
235
|
-
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002460167 使用文档}
|
|
419
|
+
* 选填, 扩展字段, 尽量避免用
|
|
236
420
|
*/
|
|
237
|
-
|
|
421
|
+
extra?: any;
|
|
238
422
|
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
423
|
+
* 选填, 是否容器组件
|
|
424
|
+
*
|
|
425
|
+
* 容器可以包含子节点,但是不能配置插槽
|
|
241
426
|
*/
|
|
242
|
-
|
|
427
|
+
isContainer?: boolean;
|
|
243
428
|
/**
|
|
244
|
-
*
|
|
429
|
+
* 默认样式
|
|
430
|
+
* defaultStyles 接收一个React.CSSProperties对象
|
|
245
431
|
*/
|
|
246
|
-
|
|
432
|
+
defaultStyles?: {
|
|
433
|
+
[key: string]: any;
|
|
434
|
+
};
|
|
247
435
|
/**
|
|
248
|
-
*
|
|
436
|
+
* 组件所包含的子组件树
|
|
249
437
|
*/
|
|
250
|
-
|
|
438
|
+
items?: IPlatformComponent[];
|
|
439
|
+
}
|
|
440
|
+
type Scene = 'batchCreate' | 'batchSelect' | 'batchDelete' | 'create' | 'select' | 'update';
|
|
441
|
+
type SceneTarget = 'condition' | 'value' | 'limit' | 'offset';
|
|
442
|
+
/**
|
|
443
|
+
* 低码组件可以被捕获的事件信息
|
|
444
|
+
*/
|
|
445
|
+
export interface IEvent {
|
|
251
446
|
/**
|
|
252
|
-
*
|
|
253
|
-
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002459983 使用文档}
|
|
447
|
+
* 必填, 用作抛出和捕获事件的唯一标识
|
|
254
448
|
*/
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* 规则名称
|
|
258
|
-
*/
|
|
259
|
-
rule: string;
|
|
260
|
-
options?: {
|
|
261
|
-
/**
|
|
262
|
-
* 标题,支持 markdown
|
|
263
|
-
*/
|
|
264
|
-
title: string;
|
|
265
|
-
/**
|
|
266
|
-
* 描述,支持 markdown
|
|
267
|
-
*/
|
|
268
|
-
description: string;
|
|
269
|
-
/**
|
|
270
|
-
* 类型
|
|
271
|
-
*/
|
|
272
|
-
type: string;
|
|
273
|
-
/**
|
|
274
|
-
* 名称
|
|
275
|
-
*/
|
|
276
|
-
name?: string;
|
|
277
|
-
/**
|
|
278
|
-
* 标签
|
|
279
|
-
*/
|
|
280
|
-
label?: string;
|
|
281
|
-
/**
|
|
282
|
-
* 提示
|
|
283
|
-
*/
|
|
284
|
-
tooltip?: string;
|
|
285
|
-
/**
|
|
286
|
-
* 选填,版本,版本,支持 markdown
|
|
287
|
-
*/
|
|
288
|
-
version?: string;
|
|
289
|
-
/**
|
|
290
|
-
* 可选,是否允许失败
|
|
291
|
-
*/
|
|
292
|
-
allowFailure?: boolean;
|
|
293
|
-
/**
|
|
294
|
-
* 可选,限制当前选中平台,不填不限制,默认为 null
|
|
295
|
-
*/
|
|
296
|
-
matchedSelectedPlatform?: ('h5' | 'miniprogram' | 'pc')[];
|
|
297
|
-
/**
|
|
298
|
-
* 可选,限制当前发布平台,不填不限制,默认为 'all'
|
|
299
|
-
*/
|
|
300
|
-
matchedPublishedPlatform?: ('web' | 'miniprogram' | 'all')[];
|
|
301
|
-
/**
|
|
302
|
-
* 特殊字段,因 rule 的不同而不同
|
|
303
|
-
*/
|
|
304
|
-
extra?: any;
|
|
305
|
-
action?: {
|
|
306
|
-
[key: string]: any;
|
|
307
|
-
};
|
|
308
|
-
[k: string]: unknown;
|
|
309
|
-
};
|
|
310
|
-
}[];
|
|
449
|
+
name: string;
|
|
311
450
|
/**
|
|
312
|
-
*
|
|
313
|
-
* {@link https://tapd.woa.com/TCB_new/markdown_wikis/show/#1220422223002470249 使用文档}
|
|
451
|
+
* 选填, 事件别名, 用于低码平台展示
|
|
314
452
|
*/
|
|
315
|
-
|
|
316
|
-
[key: string]: {
|
|
317
|
-
visible: boolean;
|
|
318
|
-
} | boolean;
|
|
319
|
-
} | {
|
|
320
|
-
$blockedAll: true;
|
|
321
|
-
};
|
|
453
|
+
title: string;
|
|
322
454
|
/**
|
|
323
|
-
*
|
|
455
|
+
* 选填 事件描述
|
|
324
456
|
*/
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
457
|
+
description?: string;
|
|
458
|
+
/**
|
|
459
|
+
* 选填,事件生效的平台
|
|
460
|
+
*/
|
|
461
|
+
'x-platforms'?: XPlatform[];
|
|
462
|
+
/**
|
|
463
|
+
* 事件参数对象
|
|
464
|
+
*/
|
|
465
|
+
detail?: {
|
|
466
|
+
[key: string]: any;
|
|
330
467
|
};
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* 低码组件可以暴露的自定义方法
|
|
471
|
+
*/
|
|
472
|
+
export interface IMethod {
|
|
331
473
|
/**
|
|
332
|
-
*
|
|
474
|
+
* 必填, 用作组件方法的唯一标识
|
|
333
475
|
*/
|
|
334
|
-
|
|
476
|
+
name: string;
|
|
335
477
|
/**
|
|
336
|
-
*
|
|
478
|
+
* 必填, 组件方法别名, 用于低码平台展示
|
|
337
479
|
*/
|
|
338
|
-
|
|
480
|
+
label: string;
|
|
339
481
|
/**
|
|
340
|
-
*
|
|
341
|
-
*
|
|
482
|
+
* 选填, 组件方法可以接收的数据
|
|
483
|
+
* 需要符合 JSON SCHEMA 规范
|
|
484
|
+
*
|
|
485
|
+
* @default {}
|
|
342
486
|
*/
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
* - 比如 指定为 `contentSlot`,如果 `form` 指定了值为 `contentSlot`,则会插入到 `contentSlot` 中,而不是 `form` 里
|
|
368
|
-
*/
|
|
369
|
-
insertSlotName?: string;
|
|
487
|
+
params?: any;
|
|
488
|
+
/**
|
|
489
|
+
* 选填, 组件自定义方法适配的平台
|
|
490
|
+
*/
|
|
491
|
+
'x-platforms'?: string[];
|
|
492
|
+
/**
|
|
493
|
+
* 选填, 组件方法描述
|
|
494
|
+
*/
|
|
495
|
+
description?: string;
|
|
496
|
+
}
|
|
497
|
+
export interface IRenderMode {
|
|
498
|
+
/**
|
|
499
|
+
* 必填, 转换的目标组件名称
|
|
500
|
+
*/
|
|
501
|
+
component: string;
|
|
502
|
+
/**
|
|
503
|
+
* 必填, 表示升级还是替换
|
|
504
|
+
*/
|
|
505
|
+
renderType: 'update' | 'replace';
|
|
506
|
+
/**
|
|
507
|
+
* 选填, [源组件的属性路径]:[转换目标组件的属性路径] 标记属性路径的映射关系
|
|
508
|
+
*/
|
|
509
|
+
props?: {
|
|
510
|
+
[name: string]: string;
|
|
370
511
|
};
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
512
|
+
/**
|
|
513
|
+
* 选填, 表示升级组件所属组件库,默认与废弃组件同库
|
|
514
|
+
*/
|
|
515
|
+
materialName?: string;
|
|
516
|
+
/**
|
|
517
|
+
* 选填, 升级说明
|
|
518
|
+
*/
|
|
519
|
+
description?: string;
|
|
520
|
+
}
|
|
521
|
+
/** 组件/方法/属性所支持的平台 */
|
|
522
|
+
export type XPlatform = `${EPlatform}`;
|
|
523
|
+
/** 组件/方法/属性所支持的平台枚举值 */
|
|
524
|
+
export enum EPlatform {
|
|
525
|
+
/**
|
|
526
|
+
* Web 端
|
|
527
|
+
*
|
|
528
|
+
* *包含 `PCWEB` 和 `MOBILEWEB`*
|
|
529
|
+
*/
|
|
530
|
+
WEB = "WEB",
|
|
531
|
+
/**
|
|
532
|
+
* 移动端
|
|
533
|
+
*
|
|
534
|
+
* *包含 `MP` 和 `MOBILEWEB`*
|
|
535
|
+
*/
|
|
536
|
+
MOBILE = "MOBILE",
|
|
537
|
+
/** 小程序端 */
|
|
538
|
+
MP = "MP",
|
|
539
|
+
/** 桌面 Web 端 */
|
|
540
|
+
PCWEB = "PCWEB",
|
|
541
|
+
/** 移动 Web 端 */
|
|
542
|
+
MOBILEWEB = "MOBILEWEB"
|
|
543
|
+
}
|
|
544
|
+
/** 组件在应用编辑器/低码编辑器的生效情况*/
|
|
545
|
+
export type VisibleItem = 'APP' | 'COMPONENT';
|
|
546
|
+
/** 组件模板配置 */
|
|
547
|
+
export interface ITemplate {
|
|
548
|
+
/**
|
|
549
|
+
* 插入模板的节点或插槽
|
|
550
|
+
* 不设置或设置 $children 表示插入到当前组件,可配置多个节点或插槽并用逗号隔开
|
|
551
|
+
*/
|
|
552
|
+
to?: '$children' | string;
|
|
553
|
+
/**
|
|
554
|
+
* 插入模板的时机
|
|
555
|
+
* 不设置或设置 $attached 表示刚拖入组件时执行,可配置多个属性名称并用逗号隔开
|
|
556
|
+
*/
|
|
557
|
+
when?: '$attached' | string;
|
|
558
|
+
/**
|
|
559
|
+
* 插入的模板主体
|
|
560
|
+
* 目前仅支持 toml 配置语法,结构内容参考组件 CALS
|
|
561
|
+
*/
|
|
562
|
+
body?: string;
|
|
563
|
+
/**
|
|
564
|
+
* 插入模板时自动选中的节点
|
|
565
|
+
* 如 template[0] 表示选中所插入模板的第1个节点
|
|
566
|
+
*/
|
|
567
|
+
autoSelectPath?: `template${string}`;
|
|
568
|
+
/**
|
|
569
|
+
* 见文档 https://iwiki.woa.com/p/4009680778#templatesindexremain
|
|
570
|
+
*/
|
|
571
|
+
remain?: string;
|
|
572
|
+
}
|
|
573
|
+
/** 组件快捷编辑协议 */
|
|
574
|
+
export interface IShortcut {
|
|
575
|
+
/**
|
|
576
|
+
* 选填,快捷编辑面板中支持的组件属性
|
|
577
|
+
*/
|
|
578
|
+
props?: string[];
|
|
579
|
+
/**
|
|
580
|
+
* 选填,快捷编辑面板中支持拖入的组件
|
|
581
|
+
*/
|
|
582
|
+
extra?: {
|
|
583
|
+
[key: string]: {
|
|
584
|
+
'x-component': 'container';
|
|
585
|
+
'x-component-props'?: string[];
|
|
586
|
+
'x-index'?: number;
|
|
587
|
+
'x-insert-path'?: string;
|
|
398
588
|
};
|
|
399
|
-
/**
|
|
400
|
-
* 绑定路径配置
|
|
401
|
-
*
|
|
402
|
-
* 如果没有配置,默认就是 `params`,举例说明:
|
|
403
|
-
* - 配置 `select.condition` 为 `'params.abc'`,则输出的 SQL 为 `SELECT aa FROM xxx WHERE key={{params.abc}}`
|
|
404
|
-
* - 配置 `create.value` 为 `'params.hello'`,则输出的 SQL 为 `INSERT INTO xxx (a, b) VALUES ({{params.hello.a}}, {{params.hello.b }})`
|
|
405
|
-
*/
|
|
406
|
-
bindParamsPath?: Partial<Record<Scene, Partial<Record<SceneTarget, string>>>>;
|
|
407
|
-
quickOperateButton?: {
|
|
408
|
-
icon: string;
|
|
409
|
-
targetField: string;
|
|
410
|
-
content: string;
|
|
411
|
-
}[];
|
|
412
|
-
};
|
|
413
|
-
globalConfig?: {
|
|
414
|
-
[key: string]: any;
|
|
415
589
|
};
|
|
416
|
-
}
|
|
417
|
-
/**
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
items?: IPlatformComponent[];
|
|
438
|
-
}
|
|
439
|
-
type Scene = 'batchCreate' | 'batchSelect' | 'batchDelete' | 'create' | 'select' | 'update';
|
|
440
|
-
type SceneTarget = 'condition' | 'value' | 'limit' | 'offset';
|
|
441
|
-
/**
|
|
442
|
-
* 低码组件可以被捕获的事件信息
|
|
443
|
-
*/
|
|
444
|
-
export interface IEvent {
|
|
445
|
-
/**
|
|
446
|
-
* 必填, 用作抛出和捕获事件的唯一标识
|
|
447
|
-
*/
|
|
448
|
-
name: string;
|
|
449
|
-
/**
|
|
450
|
-
* 选填, 事件别名, 用于低码平台展示
|
|
451
|
-
*/
|
|
452
|
-
title: string;
|
|
453
|
-
/**
|
|
454
|
-
* 选填 事件描述
|
|
455
|
-
*/
|
|
456
|
-
description?: string;
|
|
457
|
-
/**
|
|
458
|
-
* 选填,事件生效的平台
|
|
459
|
-
*/
|
|
460
|
-
'x-platforms'?: XPlatform[];
|
|
461
|
-
/**
|
|
462
|
-
* 事件参数对象
|
|
463
|
-
*/
|
|
464
|
-
detail?: {
|
|
465
|
-
[key: string]: any;
|
|
466
|
-
};
|
|
467
|
-
}
|
|
468
|
-
/**
|
|
469
|
-
* 低码组件可以暴露的自定义方法
|
|
470
|
-
*/
|
|
471
|
-
export interface IMethod {
|
|
472
|
-
/**
|
|
473
|
-
* 必填, 用作组件方法的唯一标识
|
|
474
|
-
*/
|
|
475
|
-
name: string;
|
|
476
|
-
/**
|
|
477
|
-
* 必填, 组件方法别名, 用于低码平台展示
|
|
478
|
-
*/
|
|
479
|
-
label: string;
|
|
480
|
-
/**
|
|
481
|
-
* 选填, 组件方法可以接收的数据
|
|
482
|
-
* 需要符合 JSON SCHEMA 规范
|
|
483
|
-
*
|
|
484
|
-
* @default {}
|
|
485
|
-
*/
|
|
486
|
-
params?: any;
|
|
487
|
-
/**
|
|
488
|
-
* 选填, 组件自定义方法适配的平台
|
|
489
|
-
*/
|
|
490
|
-
'x-platforms'?: string[];
|
|
491
|
-
/**
|
|
492
|
-
* 选填, 组件方法描述
|
|
493
|
-
*/
|
|
494
|
-
description?: string;
|
|
495
|
-
}
|
|
496
|
-
export interface IRenderMode {
|
|
497
|
-
/**
|
|
498
|
-
* 必填, 转换的目标组件名称
|
|
499
|
-
*/
|
|
500
|
-
component: string;
|
|
501
|
-
/**
|
|
502
|
-
* 必填, 表示升级还是替换
|
|
503
|
-
*/
|
|
504
|
-
renderType: 'update' | 'replace';
|
|
505
|
-
/**
|
|
506
|
-
* 选填, [源组件的属性路径]:[转换目标组件的属性路径] 标记属性路径的映射关系
|
|
507
|
-
*/
|
|
508
|
-
props?: {
|
|
509
|
-
[name: string]: string;
|
|
510
|
-
};
|
|
511
|
-
/**
|
|
512
|
-
* 选填, 表示升级组件所属组件库,默认与废弃组件同库
|
|
513
|
-
*/
|
|
514
|
-
materialName?: string;
|
|
515
|
-
/**
|
|
516
|
-
* 选填, 升级说明
|
|
517
|
-
*/
|
|
518
|
-
description?: string;
|
|
519
|
-
}
|
|
520
|
-
/** 组件/方法/属性所支持的平台 */
|
|
521
|
-
export type XPlatform = `${EPlatform}`;
|
|
522
|
-
/** 组件/方法/属性所支持的平台枚举值 */
|
|
523
|
-
export declare enum EPlatform {
|
|
524
|
-
/**
|
|
525
|
-
* Web 端
|
|
526
|
-
*
|
|
527
|
-
* *包含 `PCWEB` 和 `MOBILEWEB`*
|
|
528
|
-
*/
|
|
529
|
-
WEB = "WEB",
|
|
530
|
-
/**
|
|
531
|
-
* 移动端
|
|
532
|
-
*
|
|
533
|
-
* *包含 `MP` 和 `MOBILEWEB`*
|
|
534
|
-
*/
|
|
535
|
-
MOBILE = "MOBILE",
|
|
536
|
-
/** 小程序端 */
|
|
537
|
-
MP = "MP",
|
|
538
|
-
/** 桌面 Web 端 */
|
|
539
|
-
PCWEB = "PCWEB",
|
|
540
|
-
/** 移动 Web 端 */
|
|
541
|
-
MOBILEWEB = "MOBILEWEB"
|
|
542
|
-
}
|
|
543
|
-
/** 组件在应用编辑器/低码编辑器的生效情况*/
|
|
544
|
-
export type VisibleItem = 'APP' | 'COMPONENT';
|
|
545
|
-
/** 组件模板配置 */
|
|
546
|
-
export interface ITemplate {
|
|
547
|
-
/**
|
|
548
|
-
* 插入模板的节点或插槽
|
|
549
|
-
* 不设置或设置 $children 表示插入到当前组件,可配置多个节点或插槽并用逗号隔开
|
|
550
|
-
*/
|
|
551
|
-
to?: '$children' | string;
|
|
552
|
-
/**
|
|
553
|
-
* 插入模板的时机
|
|
554
|
-
* 不设置或设置 $attached 表示刚拖入组件时执行,可配置多个属性名称并用逗号隔开
|
|
555
|
-
*/
|
|
556
|
-
when?: '$attached' | string;
|
|
557
|
-
/**
|
|
558
|
-
* 插入的模板主体
|
|
559
|
-
* 目前仅支持 toml 配置语法,结构内容参考组件 CALS
|
|
560
|
-
*/
|
|
561
|
-
body?: string;
|
|
562
|
-
/**
|
|
563
|
-
* 插入模板时自动选中的节点
|
|
564
|
-
* 如 template[0] 表示选中所插入模板的第1个节点
|
|
565
|
-
*/
|
|
566
|
-
autoSelectPath?: `template${string}`;
|
|
567
|
-
/**
|
|
568
|
-
* 见文档 https://iwiki.woa.com/p/4009680778#templatesindexremain
|
|
569
|
-
*/
|
|
570
|
-
remain?: string;
|
|
571
|
-
}
|
|
572
|
-
/** 组件快捷编辑协议 */
|
|
573
|
-
export interface IShortcut {
|
|
574
|
-
/**
|
|
575
|
-
* 选填,快捷编辑面板中支持的组件属性
|
|
576
|
-
*/
|
|
577
|
-
props?: string[];
|
|
578
|
-
/**
|
|
579
|
-
* 选填,快捷编辑面板中支持拖入的组件
|
|
580
|
-
*/
|
|
581
|
-
extra?: {
|
|
582
|
-
[key: string]: {
|
|
583
|
-
'x-component': 'container';
|
|
584
|
-
'x-component-props'?: string[];
|
|
585
|
-
'x-index'?: number;
|
|
586
|
-
'x-insert-path'?: string;
|
|
587
|
-
};
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
/** 组件样式 API */
|
|
591
|
-
export interface IClasses {
|
|
592
|
-
/**
|
|
593
|
-
* 样式名称
|
|
594
|
-
*/
|
|
595
|
-
name: string;
|
|
596
|
-
/**
|
|
597
|
-
* 样式选择器
|
|
598
|
-
*/
|
|
599
|
-
selector: string;
|
|
600
|
-
/**
|
|
601
|
-
* 样式片段代码(需要填写完整的样式代码)
|
|
602
|
-
*/
|
|
603
|
-
code?: string;
|
|
604
|
-
/**
|
|
605
|
-
* 样式说明
|
|
606
|
-
*/
|
|
607
|
-
description?: string;
|
|
590
|
+
}
|
|
591
|
+
/** 组件样式 API */
|
|
592
|
+
export interface IClasses {
|
|
593
|
+
/**
|
|
594
|
+
* 样式名称
|
|
595
|
+
*/
|
|
596
|
+
name: string;
|
|
597
|
+
/**
|
|
598
|
+
* 样式选择器
|
|
599
|
+
*/
|
|
600
|
+
selector: string;
|
|
601
|
+
/**
|
|
602
|
+
* 样式片段代码(需要填写完整的样式代码)
|
|
603
|
+
*/
|
|
604
|
+
code?: string;
|
|
605
|
+
/**
|
|
606
|
+
* 样式说明
|
|
607
|
+
*/
|
|
608
|
+
description?: string;
|
|
609
|
+
}
|
|
610
|
+
export {};
|
|
608
611
|
}
|
|
609
|
-
export {};
|
|
610
612
|
//# sourceMappingURL=lcds.d.ts.map
|