@cloudbase/cals 1.0.0 → 1.0.1-2.beta.0
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/parser/cals/index.d.ts +63 -3
- package/lib/parser/cals/index.d.ts.map +1 -1
- package/lib/parser/cals/index.js +240 -91
- package/lib/parser/cals/utils/block/index.d.ts +0 -0
- package/lib/parser/cals/utils/block/index.d.ts.map +1 -1
- package/lib/parser/cals/utils/block/index.js +7 -3
- package/lib/parser/cals/utils/code/index.d.ts +0 -0
- package/lib/parser/cals/utils/code/index.d.ts.map +1 -1
- package/lib/parser/cals/utils/code/index.js +18 -12
- package/lib/parser/cals/utils/common.d.ts +0 -0
- package/lib/parser/cals/utils/common.d.ts.map +0 -0
- package/lib/parser/cals/utils/common.js +0 -0
- package/lib/parser/cals/utils/runtime.d.ts +0 -0
- package/lib/parser/cals/utils/runtime.d.ts.map +1 -1
- package/lib/parser/cals/utils/runtime.js +5 -2
- package/lib/parser/cals/utils/spinoff/index.d.ts +0 -0
- package/lib/parser/cals/utils/spinoff/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/spinoff/index.js +0 -0
- package/lib/parser/cals/utils/style.d.ts +0 -0
- package/lib/parser/cals/utils/style.d.ts.map +1 -1
- package/lib/parser/cals/utils/style.js +7 -3
- package/lib/parser/cals/utils/template.d.ts +0 -0
- package/lib/parser/cals/utils/template.d.ts.map +0 -0
- package/lib/parser/cals/utils/template.js +0 -0
- package/lib/parser/cals/utils/version/common.d.ts +0 -0
- package/lib/parser/cals/utils/version/common.d.ts.map +1 -1
- package/lib/parser/cals/utils/version/common.js +16 -33
- package/lib/parser/cals/utils/version/config.d.ts +0 -0
- package/lib/parser/cals/utils/version/config.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/config.js +0 -0
- package/lib/parser/cals/utils/version/index.d.ts +0 -0
- package/lib/parser/cals/utils/version/index.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/index.js +0 -0
- package/lib/parser/cals/utils/version/parses.d.ts +0 -0
- package/lib/parser/cals/utils/version/parses.d.ts.map +1 -1
- package/lib/parser/cals/utils/version/parses.js +18 -36
- package/lib/parser/cals/utils/version/utils.d.ts +0 -0
- package/lib/parser/cals/utils/version/utils.d.ts.map +0 -0
- package/lib/parser/cals/utils/version/utils.js +5 -2
- package/lib/parser/expression/index.d.ts +0 -0
- package/lib/parser/expression/index.d.ts.map +0 -0
- package/lib/parser/expression/index.js +0 -0
- package/lib/parser/index.d.ts +0 -0
- package/lib/parser/index.d.ts.map +0 -0
- package/lib/parser/index.js +0 -0
- package/lib/parser/plugins/postcss-rpx2clac.js +2 -2
- package/lib/types/basic/app.d.ts +0 -0
- package/lib/types/basic/app.d.ts.map +0 -0
- package/lib/types/basic/app.js +0 -0
- package/lib/types/basic/common.d.ts +2 -1
- package/lib/types/basic/common.d.ts.map +1 -1
- package/lib/types/basic/common.js +0 -0
- package/lib/types/basic/component.d.ts +5 -0
- package/lib/types/basic/component.d.ts.map +1 -1
- package/lib/types/basic/component.js +0 -0
- package/lib/types/basic/datasource.d.ts +0 -0
- package/lib/types/basic/datasource.d.ts.map +0 -0
- package/lib/types/basic/datasource.js +0 -0
- package/lib/types/index.d.ts +2 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +14 -1
- package/lib/types/lcds.d.ts +400 -114
- package/lib/types/lcds.d.ts.map +1 -1
- package/lib/types/lcds.js +0 -0
- package/lib/types/platform/app.d.ts +4 -0
- package/lib/types/platform/app.d.ts.map +1 -1
- package/lib/types/platform/app.js +0 -0
- package/lib/types/platform/common.d.ts +11 -1
- package/lib/types/platform/common.d.ts.map +1 -1
- package/lib/types/platform/common.js +0 -0
- package/lib/types/platform/component.d.ts +6 -0
- package/lib/types/platform/component.d.ts.map +1 -1
- package/lib/types/platform/component.js +0 -0
- package/lib/types/platform/datasource.d.ts +0 -0
- package/lib/types/platform/datasource.d.ts.map +0 -0
- package/lib/types/platform/datasource.js +0 -0
- package/lib/types/platform/eventFlow.d.ts +20 -0
- package/lib/types/platform/eventFlow.d.ts.map +1 -0
- package/lib/types/platform/eventFlow.js +2 -0
- package/lib/types/platform/query.d.ts +67 -0
- package/lib/types/platform/query.d.ts.map +1 -0
- package/lib/types/platform/query.js +2 -0
- package/lib/types/platform/widget/form.d.ts +0 -0
- package/lib/types/platform/widget/form.d.ts.map +0 -0
- package/lib/types/platform/widget/form.js +0 -0
- package/lib/types/platform/widget/meta.d.ts +0 -0
- package/lib/types/platform/widget/meta.d.ts.map +0 -0
- package/lib/types/platform/widget/meta.js +0 -0
- package/lib/utils/CSSProperty.d.ts +0 -0
- package/lib/utils/CSSProperty.d.ts.map +0 -0
- package/lib/utils/CSSProperty.js +0 -0
- package/lib/utils/build.d.ts +0 -0
- package/lib/utils/build.d.ts.map +0 -0
- package/lib/utils/build.js +3 -3
- package/lib/utils/constant.d.ts +0 -0
- package/lib/utils/constant.d.ts.map +0 -0
- package/lib/utils/constant.js +0 -0
- package/lib/utils/dts/auto-generated.d.ts +1 -1
- package/lib/utils/dts/auto-generated.d.ts.map +1 -1
- package/lib/utils/dts/auto-generated.js +1241 -35
- package/lib/utils/dts/index.d.ts +46 -5
- package/lib/utils/dts/index.d.ts.map +1 -1
- package/lib/utils/dts/index.js +478 -68
- package/lib/utils/index.d.ts +0 -0
- package/lib/utils/index.d.ts.map +0 -0
- package/lib/utils/index.js +0 -0
- package/lib/utils/version/featureChecker.js +2 -2
- package/lib/utils/version/migrations/version4.js +2 -2
- package/package.json +2 -1
- package/lib/parser/constants.d.ts +0 -2
- package/lib/parser/constants.d.ts.map +0 -1
- package/lib/parser/constants.js +0 -4
- package/lib/utils/version-migrations/common.d.ts +0 -5
- package/lib/utils/version-migrations/common.d.ts.map +0 -1
- package/lib/utils/version-migrations/common.js +0 -29
- package/lib/utils/version-migrations/version4.d.ts +0 -3
- package/lib/utils/version-migrations/version4.d.ts.map +0 -1
- package/lib/utils/version-migrations/version4.js +0 -199
|
@@ -21,21 +21,28 @@ exports.wedaDTS = `declare class UserWidget {
|
|
|
21
21
|
// ========== 快捷访问方式 ========== //
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* 组件
|
|
24
|
+
* 组件 ID,微搭中一般由编辑器生成
|
|
25
25
|
*/
|
|
26
26
|
readonly id: string;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* 组件库名
|
|
29
29
|
*/
|
|
30
30
|
readonly module: string;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* 组件名
|
|
33
33
|
*/
|
|
34
34
|
readonly component: string;
|
|
35
|
-
// FIXME: 暂时不对外暴露
|
|
36
|
-
// readonly parent: UserWidget;
|
|
37
|
-
// readonly children: UserWidget[];
|
|
38
35
|
|
|
36
|
+
/**
|
|
37
|
+
* 父组件引用
|
|
38
|
+
*/
|
|
39
|
+
readonly parent: UserWidget;
|
|
40
|
+
/**
|
|
41
|
+
* 子组件集合
|
|
42
|
+
*/
|
|
43
|
+
readonly children: UserWidget[];
|
|
44
|
+
|
|
45
|
+
// FIXME: 暂时不对外暴露
|
|
39
46
|
// closest(filter?: (parentWidget: UserWidget) => boolean): UserWidget | null;
|
|
40
47
|
}
|
|
41
48
|
|
|
@@ -43,14 +50,52 @@ exports.wedaDTS = `declare class UserWidget {
|
|
|
43
50
|
// Used Components - Don't touch me
|
|
44
51
|
// Used Components Inner End
|
|
45
52
|
|
|
53
|
+
// Redefine Any Type Inner Begin
|
|
54
|
+
// Redefine Any Type - Don't touch me
|
|
55
|
+
// Redefine Any Type Inner End
|
|
56
|
+
|
|
46
57
|
declare namespace $app {
|
|
47
|
-
|
|
58
|
+
/**
|
|
59
|
+
* 应用 ID
|
|
60
|
+
*
|
|
61
|
+
* @privateForWeDa
|
|
62
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "应用 ID"}
|
|
63
|
+
*/
|
|
64
|
+
const id: string;
|
|
65
|
+
/**
|
|
66
|
+
* 应用名称
|
|
67
|
+
*
|
|
68
|
+
* @privateForWeDa
|
|
69
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "应用名称"}
|
|
70
|
+
*/
|
|
48
71
|
const label: string;
|
|
72
|
+
/**
|
|
73
|
+
* 应用版本
|
|
74
|
+
*
|
|
75
|
+
* @privateForWeDa
|
|
76
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "应用版本"}
|
|
77
|
+
*/
|
|
49
78
|
const version: string;
|
|
79
|
+
/**
|
|
80
|
+
* 小程序APPID
|
|
81
|
+
*
|
|
82
|
+
* @privateForWeDa
|
|
83
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "小程序APPID"}
|
|
84
|
+
*/
|
|
50
85
|
const mpAppId: string;
|
|
86
|
+
/**
|
|
87
|
+
* 小程序名称
|
|
88
|
+
*
|
|
89
|
+
* @privateForWeDa
|
|
90
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "小程序名称"}
|
|
91
|
+
*/
|
|
51
92
|
const mpAppName: string;
|
|
52
93
|
|
|
53
94
|
namespace dataset {
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* 全局变量对象
|
|
98
|
+
*/
|
|
54
99
|
const state: {
|
|
55
100
|
// Global State Inner Begin
|
|
56
101
|
// Global State 全局变量 - Don't touch me
|
|
@@ -58,12 +103,23 @@ namespace dataset {
|
|
|
58
103
|
};
|
|
59
104
|
}
|
|
60
105
|
|
|
106
|
+
/**
|
|
107
|
+
* 全局 common 方法
|
|
108
|
+
*/
|
|
61
109
|
namespace common {
|
|
62
110
|
// Global Common Inner Begin
|
|
63
111
|
// Global Common 全局方法 - Don't touch me
|
|
64
112
|
// Global Common Inner End
|
|
65
113
|
}
|
|
66
114
|
|
|
115
|
+
/**
|
|
116
|
+
* 已废弃,请改用 $w.utils
|
|
117
|
+
*/
|
|
118
|
+
const utils: any
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* 设置页面变量
|
|
122
|
+
*/
|
|
67
123
|
function setState(data: Object): void;
|
|
68
124
|
|
|
69
125
|
}
|
|
@@ -71,73 +127,273 @@ function setState(data: Object): void;
|
|
|
71
127
|
declare const app = $app;
|
|
72
128
|
|
|
73
129
|
declare namespace $w {
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* 当前应用实例
|
|
133
|
+
*
|
|
134
|
+
* @privateForWeDa
|
|
135
|
+
* {"group": "sysVar", "displayType": "object", "displayName": "应用信息", "schema": {"type":"object","properties":{"id":{"type":"string","title":"应用 ID"},"label":{"type":"string","title":"应用名称"},"version":{"type":"string","title":"应用版本"},"mpAppName":{"type":"string","title":"小程序名称"},"mpAppId":{"type":"string","title":"小程序APPID"}}}}
|
|
136
|
+
*/
|
|
74
137
|
const app = $app;
|
|
75
138
|
|
|
139
|
+
/**
|
|
140
|
+
* 当前页面信息
|
|
141
|
+
*
|
|
142
|
+
* @privateForWeDa
|
|
143
|
+
* {"group": "sysVar", "displayType": "object", "displayName": "当前页面信息", "schema": {"type":"object","properties":{"id":{"type":"string","title":"页面 ID"},"label":{"type":"string","title":"页面名称"},"path":{"type":"string","title":"页面路径"}}}}
|
|
144
|
+
*/
|
|
76
145
|
const page = $page;
|
|
77
146
|
|
|
147
|
+
/**
|
|
148
|
+
* 用户权限相关方法和属性
|
|
149
|
+
*/
|
|
78
150
|
namespace auth {
|
|
79
|
-
|
|
151
|
+
|
|
152
|
+
interface CurrentUserInfo {
|
|
153
|
+
/**
|
|
154
|
+
* 用户 ID
|
|
155
|
+
*
|
|
156
|
+
* @privateForWeDa
|
|
157
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "用户 ID"}
|
|
158
|
+
*/
|
|
80
159
|
userId?: string;
|
|
160
|
+
/**
|
|
161
|
+
* 手机
|
|
162
|
+
*
|
|
163
|
+
* @privateForWeDa
|
|
164
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "手机"}
|
|
165
|
+
*/
|
|
81
166
|
phone?: string;
|
|
167
|
+
/**
|
|
168
|
+
* 用户类型
|
|
169
|
+
*
|
|
170
|
+
* @privateForWeDa
|
|
171
|
+
* {"group": "sysVar", "displayType": "number", "displayName": "用户类型"}
|
|
172
|
+
*/
|
|
82
173
|
type?: number;
|
|
174
|
+
/**
|
|
175
|
+
* 用户关联角色
|
|
176
|
+
*
|
|
177
|
+
* @privateForWeDa
|
|
178
|
+
* {"group": "sysVar", "displayType": "array", "displayName": "用户关联角色"}
|
|
179
|
+
*/
|
|
83
180
|
relatedRoles?: {
|
|
181
|
+
/**
|
|
182
|
+
* 角色 ID
|
|
183
|
+
*
|
|
184
|
+
* @privateForWeDa
|
|
185
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "角色 ID"}
|
|
186
|
+
*/
|
|
84
187
|
id?: string;
|
|
188
|
+
/**
|
|
189
|
+
* 环境 ID
|
|
190
|
+
*
|
|
191
|
+
* @privateForWeDa
|
|
192
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "环境 ID"}
|
|
193
|
+
*/
|
|
85
194
|
envId?: string;
|
|
195
|
+
/**
|
|
196
|
+
* 角色名称
|
|
197
|
+
*
|
|
198
|
+
* @privateForWeDa
|
|
199
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "角色名称"}
|
|
200
|
+
*/
|
|
86
201
|
name?: string;
|
|
202
|
+
/**
|
|
203
|
+
* 角色标识
|
|
204
|
+
*
|
|
205
|
+
* @privateForWeDa
|
|
206
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "角色标识"}
|
|
207
|
+
*/
|
|
87
208
|
roleIdentity?: string;
|
|
88
209
|
}[];
|
|
210
|
+
/**
|
|
211
|
+
* 微信/企微 openId
|
|
212
|
+
*
|
|
213
|
+
* @privateForWeDa
|
|
214
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "微信/企微 openId"}
|
|
215
|
+
*/
|
|
89
216
|
openId?: string;
|
|
217
|
+
/**
|
|
218
|
+
* 用户名称
|
|
219
|
+
*
|
|
220
|
+
* @privateForWeDa
|
|
221
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "用户名称"}
|
|
222
|
+
*/
|
|
90
223
|
name?: string;
|
|
224
|
+
/**
|
|
225
|
+
* 用户昵称
|
|
226
|
+
*
|
|
227
|
+
* @privateForWeDa
|
|
228
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "用户昵称"}
|
|
229
|
+
*/
|
|
91
230
|
nickName?: string;
|
|
231
|
+
/**
|
|
232
|
+
* 邮箱
|
|
233
|
+
*
|
|
234
|
+
* @privateForWeDa
|
|
235
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "邮箱"}
|
|
236
|
+
*/
|
|
92
237
|
email?: string;
|
|
238
|
+
/**
|
|
239
|
+
* 主岗部门
|
|
240
|
+
*
|
|
241
|
+
* @privateForWeDa
|
|
242
|
+
* {"group": "sysVar", "displayType": "object", "displayName": "主岗部门"}
|
|
243
|
+
*/
|
|
93
244
|
mainOrg?: {
|
|
245
|
+
/**
|
|
246
|
+
* 主岗部门 ID
|
|
247
|
+
*
|
|
248
|
+
* @privateForWeDa
|
|
249
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "主岗部门 ID"}
|
|
250
|
+
*/
|
|
94
251
|
id?: string;
|
|
252
|
+
/**
|
|
253
|
+
* 主岗部门名称
|
|
254
|
+
*
|
|
255
|
+
* @privateForWeDa
|
|
256
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "主岗部门名称"}
|
|
257
|
+
*/
|
|
95
258
|
name?: string;
|
|
96
259
|
};
|
|
260
|
+
/**
|
|
261
|
+
* 兼岗部门
|
|
262
|
+
*
|
|
263
|
+
* @privateForWeDa
|
|
264
|
+
* {"group": "sysVar", "displayType": "object", "displayName": "兼岗部门"}
|
|
265
|
+
*/
|
|
97
266
|
orgs?: {
|
|
267
|
+
/**
|
|
268
|
+
* 兼岗部门 ID
|
|
269
|
+
*
|
|
270
|
+
* @privateForWeDa
|
|
271
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "兼岗部门 ID"}
|
|
272
|
+
*/
|
|
98
273
|
id?: string;
|
|
274
|
+
/**
|
|
275
|
+
* 兼岗部门名称
|
|
276
|
+
*
|
|
277
|
+
* @privateForWeDa
|
|
278
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "兼岗部门名称"}
|
|
279
|
+
*/
|
|
99
280
|
name?: string;
|
|
100
281
|
}[];
|
|
101
282
|
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* 获取用户信息
|
|
286
|
+
*/
|
|
102
287
|
function getUserInfo(): CurrentUserInfo;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
*
|
|
291
|
+
* 登录用户信息
|
|
292
|
+
*
|
|
293
|
+
* @privateForWeDa
|
|
294
|
+
* {"group": "sysVar", "displayType": "object", "displayName": "登录用户信息", "schema": {"type":"object","properties":{"userId":{"type":"string","title":"用户 ID"},"phone":{"type":"string","title":"手机"},"type":{"type":"number","title":"用户类型"},"relatedRoles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","title":"角色 ID"},"envId":{"type":"string","title":"环境 ID"},"name":{"type":"string","title":"角色名称"},"roleIdentity":{"type":"string","title":"角色标识"}}},"title":"用户关联角色"},"openId":{"type":"string","title":"微信/企微 openId"},"name":{"type":"string","title":"用户名称"},"nickName":{"type":"string","title":"用户昵称"},"email":{"type":"string","title":"邮箱"},"mainOrg":{"type":"object","properties":{"id":{"type":"string","title":"主岗部门 ID"},"name":{"type":"string","title":"主岗部门名称"}},"title":"主岗部门"},"orgs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","title":"兼岗部门 ID"},"name":{"type":"string","title":"兼岗部门名称"}}},"title":"兼岗部门"}}}, "doc": "https://docs.cloudbase.net/lowcode/framework/app/app#authgetuserinfoauthcurrentuser"}
|
|
295
|
+
*/
|
|
103
296
|
const currentUser: CurrentUserInfo;
|
|
104
297
|
|
|
105
298
|
}
|
|
106
299
|
|
|
300
|
+
/**
|
|
301
|
+
* 数据源等云端能力集合
|
|
302
|
+
*/
|
|
107
303
|
namespace cloud {
|
|
108
304
|
interface ICallDataSourceParams {
|
|
305
|
+
/**
|
|
306
|
+
* 数据源标志
|
|
307
|
+
*/
|
|
109
308
|
dataSourceName: string;
|
|
309
|
+
/**
|
|
310
|
+
* 数据源方法名
|
|
311
|
+
*/
|
|
110
312
|
methodName: string;
|
|
313
|
+
/**
|
|
314
|
+
* 方法参数,根据方法实际入参填写
|
|
315
|
+
*/
|
|
111
316
|
params: Object;
|
|
112
317
|
}
|
|
113
318
|
interface ICallFunctionParams {
|
|
319
|
+
/**
|
|
320
|
+
* TCB云函数名称
|
|
321
|
+
*/
|
|
114
322
|
name: string;
|
|
323
|
+
/**
|
|
324
|
+
* 云函数接收的参数,根据自己创建的云函数入参而定
|
|
325
|
+
*/
|
|
115
326
|
data?: any;
|
|
116
327
|
}
|
|
117
328
|
interface IParseOptions {
|
|
329
|
+
/**
|
|
330
|
+
* 解析 云开发云函数的通用response 包装。为true, 则返回 res.result, 此时会丢失 res.requestId 信息
|
|
331
|
+
*/
|
|
118
332
|
unwrapResult?: boolean;
|
|
333
|
+
/**
|
|
334
|
+
* 解析业务信息,需配合 unwrapResult 使用。为 true 时, res.result.code 非 0 抛出错误, 为 0 则返回 res.result.data
|
|
335
|
+
*/
|
|
119
336
|
parseBusinessInfo?: boolean;
|
|
120
337
|
}
|
|
121
338
|
interface ICallWorkflowParams {
|
|
339
|
+
/**
|
|
340
|
+
* 方法名称
|
|
341
|
+
*/
|
|
122
342
|
action: string;
|
|
343
|
+
/**
|
|
344
|
+
* 方法的自定义参数,其中 envType, envId, uid, source 均无需填写
|
|
345
|
+
*/
|
|
123
346
|
data?: Record<string, any>;
|
|
347
|
+
/**
|
|
348
|
+
* 是否自动将 data 的key 改为大写驼峰。默认为 true, 即使用时 data 可以采用小驼峰的 key
|
|
349
|
+
*/
|
|
124
350
|
capitalizeDataKey?: boolean;
|
|
125
351
|
}
|
|
126
352
|
|
|
353
|
+
/**
|
|
354
|
+
* 调用数据源
|
|
355
|
+
*/
|
|
127
356
|
function callDataSource(params: ICallDataSourceParams): any;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* 通过 cloudid 获取静态文件的 http 访问地址
|
|
360
|
+
*/
|
|
128
361
|
function getTempFileURL(params: string | string[]): Promise<string | string[]>;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* 调用流程
|
|
365
|
+
*/
|
|
129
366
|
function callWorkflow(action: ICallWorkflowParams): Promise<any>;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* 调用云开发的云函数, 与 $w.cloud.getCloudInstance 示例中的效果大体一致
|
|
370
|
+
*/
|
|
130
371
|
function callFunction(params: ICallFunctionParams, parseOptions?: IParseOptions): Promise<any>;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* 返回云开发web-sdk初始化后的实例(无需关心tcb环境信息及认证登录的处理), 即 tcb.init 后返回的对象, 可用该对象直接调用tcb的各种能力
|
|
375
|
+
*/
|
|
131
376
|
function getCloudInstance(): Promise<CloudInstance>;
|
|
132
377
|
|
|
133
378
|
}
|
|
134
379
|
|
|
135
|
-
|
|
380
|
+
/**
|
|
381
|
+
* 平台工具方法集合
|
|
382
|
+
*/
|
|
136
383
|
namespace utils {
|
|
137
384
|
interface navigatorOptions {
|
|
385
|
+
/**
|
|
386
|
+
* 子应用包地址,例如 packages/subapp
|
|
387
|
+
*/
|
|
138
388
|
packageName: string;
|
|
389
|
+
/**
|
|
390
|
+
* 页面 ID
|
|
391
|
+
*/
|
|
139
392
|
pageId: string;
|
|
140
393
|
data?: Record<string, any>;
|
|
394
|
+
/**
|
|
395
|
+
* query object 对象
|
|
396
|
+
*/
|
|
141
397
|
params?: Record<string, any>;
|
|
142
398
|
events?: Record<string, (data: any) => void>;
|
|
143
399
|
success(res: any);
|
|
@@ -146,31 +402,61 @@ function getCloudInstance(): Promise<CloudInstance>;
|
|
|
146
402
|
}
|
|
147
403
|
|
|
148
404
|
interface navigateBackOptions {
|
|
405
|
+
/**
|
|
406
|
+
* 返回的页面数,如果 delta 大于现有页面数,则返回到首页。
|
|
407
|
+
*/
|
|
149
408
|
delta: number;
|
|
150
409
|
}
|
|
151
410
|
|
|
152
|
-
|
|
411
|
+
/**
|
|
412
|
+
* 显示提示框
|
|
413
|
+
*/
|
|
153
414
|
function showToast(options);
|
|
154
415
|
|
|
155
|
-
|
|
416
|
+
/**
|
|
417
|
+
* 显示全局加载中提示
|
|
418
|
+
*/
|
|
156
419
|
function showLoading(options);
|
|
157
420
|
|
|
158
|
-
|
|
421
|
+
/**
|
|
422
|
+
* 隐藏全局加载中提示
|
|
423
|
+
*/
|
|
159
424
|
function hideLoading(options);
|
|
160
425
|
|
|
161
|
-
|
|
426
|
+
/**
|
|
427
|
+
* 显示模态弹框
|
|
428
|
+
*/
|
|
162
429
|
function showModal(options);
|
|
163
430
|
|
|
164
|
-
|
|
431
|
+
/**
|
|
432
|
+
* 拨打电话
|
|
433
|
+
*/
|
|
165
434
|
function callPhone(options);
|
|
166
435
|
|
|
167
|
-
|
|
436
|
+
/**
|
|
437
|
+
* 扫描二维码
|
|
438
|
+
*/
|
|
168
439
|
function scanCode(options: {
|
|
440
|
+
/**
|
|
441
|
+
* 是否只能从相机扫码,不允许从相册选择图片
|
|
442
|
+
*/
|
|
169
443
|
onlyFromCamera?: boolean;
|
|
170
444
|
enableDefaultBehavior?: boolean;
|
|
445
|
+
/**
|
|
446
|
+
* 扫码类型
|
|
447
|
+
*/
|
|
171
448
|
scanType?: ('barCode' | 'qrCode')[];
|
|
449
|
+
/**
|
|
450
|
+
* 接口调用成功的回调函数
|
|
451
|
+
*/
|
|
172
452
|
success?: (res: { result: string; scanType: string }) => void;
|
|
453
|
+
/**
|
|
454
|
+
* 接口调用失败的回调函数
|
|
455
|
+
*/
|
|
173
456
|
fail?: (err: Error) => void;
|
|
457
|
+
/**
|
|
458
|
+
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
|
459
|
+
*/
|
|
174
460
|
complete?: () => void;
|
|
175
461
|
}): Promise<ScanCodeResult> | ScanCodeResult;
|
|
176
462
|
|
|
@@ -234,17 +520,39 @@ function createInterstitialAd(options);
|
|
|
234
520
|
// 特制路由
|
|
235
521
|
function navigateTo(options: navigatorOptions);
|
|
236
522
|
|
|
523
|
+
/**
|
|
524
|
+
* 关闭当前页面,跳转到应用内的某个页面
|
|
525
|
+
*/
|
|
237
526
|
function redirectTo(options: navigatorOptions);
|
|
238
527
|
|
|
528
|
+
/**
|
|
529
|
+
* 关闭所有页面,打开到应用内的某个页面
|
|
530
|
+
*/
|
|
239
531
|
function reLaunch(options: navigatorOptions);
|
|
240
532
|
|
|
533
|
+
/**
|
|
534
|
+
* 返回首页
|
|
535
|
+
*/
|
|
241
536
|
function relaunchHome();
|
|
242
537
|
|
|
538
|
+
/**
|
|
539
|
+
* 关闭当前页面,返回上一页面或多级页面
|
|
540
|
+
*/
|
|
243
541
|
function navigateBack(options: navigateBackOptions);
|
|
244
542
|
|
|
543
|
+
/**
|
|
544
|
+
* 格式化枚举
|
|
545
|
+
*/
|
|
546
|
+
function formatEnum(path, optionname, app);
|
|
547
|
+
|
|
245
548
|
}
|
|
246
549
|
|
|
247
|
-
|
|
550
|
+
/**
|
|
551
|
+
* 设备信息
|
|
552
|
+
*
|
|
553
|
+
* @privateForWeDa
|
|
554
|
+
* {"group": "sysVar", "displayType": "object", "displayName": "设备信息", "schema": {"type":"object","properties":{"viewport":{"type":"object","title":"窗口","properties":{"width":{"type":"number","title":"窗口宽度"},"height":{"type":"number","title":"窗口高度"}}},"networkType":{"type":"string","title":"网络类型"}}}}
|
|
555
|
+
*/
|
|
248
556
|
namespace device {
|
|
249
557
|
/**
|
|
250
558
|
* 网络类型
|
|
@@ -266,25 +574,45 @@ enum NETWORK_TYPE {
|
|
|
266
574
|
interface IViewport {
|
|
267
575
|
/**
|
|
268
576
|
* 窗口宽度
|
|
577
|
+
*
|
|
578
|
+
* @privateForWeDa
|
|
579
|
+
* {"group": "sysVar", "displayType": "number", "displayName": "窗口宽度"}
|
|
269
580
|
*/
|
|
270
581
|
width: number;
|
|
271
582
|
/**
|
|
272
583
|
* 窗口高度
|
|
584
|
+
*
|
|
585
|
+
* @privateForWeDa
|
|
586
|
+
* {"group": "sysVar", "displayType": "number", "displayName": "窗口高度"}
|
|
273
587
|
*/
|
|
274
588
|
height: number;
|
|
275
589
|
}
|
|
276
590
|
|
|
591
|
+
/**
|
|
592
|
+
* 窗口
|
|
593
|
+
*
|
|
594
|
+
* @privateForWeDa
|
|
595
|
+
* {"group": "sysVar", "displayType": "object", "displayName": "窗口"}
|
|
596
|
+
*/
|
|
277
597
|
const viewport: IViewport;
|
|
598
|
+
/**
|
|
599
|
+
* 网络类型
|
|
600
|
+
*
|
|
601
|
+
* @privateForWeDa
|
|
602
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "网络类型"}
|
|
603
|
+
*/
|
|
278
604
|
const networkType: NETWORK_TYPE;
|
|
279
605
|
|
|
280
606
|
}
|
|
281
607
|
|
|
282
|
-
|
|
608
|
+
/**
|
|
609
|
+
* 环境信息
|
|
610
|
+
*
|
|
611
|
+
* @privateForWeDa
|
|
612
|
+
* {"group": "sysVar", "displayType": "object", "displayName": "环境信息", "schema": {"type":"object","properties":{"envId":{"type":"string","title":"环境 ID"},"type":{"type":"string","title":"环境类型"}}}}
|
|
613
|
+
*/
|
|
283
614
|
namespace env {
|
|
284
|
-
|
|
285
|
-
* 环境类型
|
|
286
|
-
*/
|
|
287
|
-
enum ENV_TYPE {
|
|
615
|
+
enum ENV_TYPE {
|
|
288
616
|
/**
|
|
289
617
|
* 生产
|
|
290
618
|
*/
|
|
@@ -295,26 +623,145 @@ enum ENV_TYPE {
|
|
|
295
623
|
'preview' = 'preview',
|
|
296
624
|
}
|
|
297
625
|
|
|
626
|
+
/**
|
|
627
|
+
* 环境类型
|
|
628
|
+
*
|
|
629
|
+
* @privateForWeDa
|
|
630
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "环境类型"}
|
|
631
|
+
*/
|
|
298
632
|
const type: ENV_TYPE;
|
|
633
|
+
/**
|
|
634
|
+
* 环境 ID
|
|
635
|
+
*
|
|
636
|
+
* @privateForWeDa
|
|
637
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "环境 ID"}
|
|
638
|
+
*/
|
|
299
639
|
const envId: string;
|
|
300
640
|
|
|
301
641
|
}
|
|
302
642
|
|
|
303
|
-
|
|
643
|
+
/**
|
|
644
|
+
* 上下文信息
|
|
645
|
+
*
|
|
646
|
+
* @privateForWeDa
|
|
647
|
+
* {"group": "sysVar", "displayType": "object", "displayName": "上下文信息", "schema": {"type":"object","properties":{"platforms":{"type":"array","title":"应用运行终端","items":{"type":"stirng"}},"isEditorMode":{"type":"boolean","title":"是否在编辑区"}}}}
|
|
648
|
+
*/
|
|
304
649
|
namespace wedaContext {
|
|
305
|
-
|
|
650
|
+
/**
|
|
651
|
+
* 是否在编辑区
|
|
652
|
+
*
|
|
653
|
+
* @privateForWeDa
|
|
654
|
+
* {"group": "sysVar", "displayType": "boolean", "displayName": "是否在编辑区"}
|
|
655
|
+
*/
|
|
656
|
+
const isEditorMode: boolean;
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* 应用运行终端
|
|
660
|
+
*
|
|
661
|
+
* @privateForWeDa
|
|
662
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "应用运行终端"}
|
|
663
|
+
*/
|
|
306
664
|
const platforms: ('WEB' | 'MOBILEWEB' | 'PCWEB' | 'MP')[];
|
|
307
665
|
|
|
308
666
|
}
|
|
309
667
|
|
|
310
|
-
|
|
668
|
+
// Global Query Inner Begin
|
|
669
|
+
// Global Query 全局查询 - Don't touch me
|
|
670
|
+
// Global Query Inner End
|
|
671
|
+
|
|
672
|
+
// Page Query Inner Begin
|
|
673
|
+
// Page Query 页面查询 - Don't touch me
|
|
674
|
+
// Page Query Inner End
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* 绝对值
|
|
678
|
+
*
|
|
679
|
+
* @remarks
|
|
680
|
+
* 计算传入数字的绝对值
|
|
681
|
+
*
|
|
682
|
+
* @privateForWeDa
|
|
683
|
+
* {"group": "formula", "displayType": "function", "displayName": "绝对值", "insertText": "ABS(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "计算传入数字的绝对值" , "definition": "ABS(数字):数字"}
|
|
684
|
+
*/
|
|
685
|
+
function ABS(num: number): number;
|
|
686
|
+
/**
|
|
687
|
+
* 最小值
|
|
688
|
+
*
|
|
689
|
+
* @remarks
|
|
690
|
+
* 返回一组数字中的最小值
|
|
691
|
+
*
|
|
692
|
+
* @privateForWeDa
|
|
693
|
+
* {"group": "formula", "displayType": "function", "displayName": "最小值", "insertText": "Min(1, 2)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回一组数字中的最小值" , "definition": "Min(数字1, [数字2, ...]):数字"}
|
|
694
|
+
*/
|
|
311
695
|
function Min(...args: number[]): number;
|
|
696
|
+
/**
|
|
697
|
+
* 最大值
|
|
698
|
+
*
|
|
699
|
+
* @remarks
|
|
700
|
+
* 返回一组数字中的最大值
|
|
701
|
+
*
|
|
702
|
+
* @privateForWeDa
|
|
703
|
+
* {"group": "formula", "displayType": "function", "displayName": "最大值", "insertText": "Max(1, 2)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回一组数字中的最大值" , "definition": "Max(数字1, [数字2, ...]):数字"}
|
|
704
|
+
*/
|
|
312
705
|
function Max(...args: number[]): number;
|
|
706
|
+
/**
|
|
707
|
+
* 平均值
|
|
708
|
+
*
|
|
709
|
+
* @remarks
|
|
710
|
+
* 返回一组数字中的平均值
|
|
711
|
+
*
|
|
712
|
+
* @privateForWeDa
|
|
713
|
+
* {"group": "formula", "displayType": "function", "displayName": "平均值", "insertText": "Average(1, 2)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回一组数字中的平均值" , "definition": "Average(数字1, [数字2, ...]):数字"}
|
|
714
|
+
*/
|
|
313
715
|
function Average(...args: number[]): number;
|
|
716
|
+
/**
|
|
717
|
+
* 向下取整
|
|
718
|
+
*
|
|
719
|
+
* @remarks
|
|
720
|
+
* 返回传入数字向下取整的结果
|
|
721
|
+
*
|
|
722
|
+
* @privateForWeDa
|
|
723
|
+
* {"group": "formula", "displayType": "function", "displayName": "向下取整", "insertText": "Floor(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回传入数字向下取整的结果" , "definition": "Floor(数字):数字"}
|
|
724
|
+
*/
|
|
314
725
|
function Floor(num: number): number;
|
|
726
|
+
/**
|
|
727
|
+
* 向上取整
|
|
728
|
+
*
|
|
729
|
+
* @remarks
|
|
730
|
+
* 返回传入数字向上取整的结果
|
|
731
|
+
*
|
|
732
|
+
* @privateForWeDa
|
|
733
|
+
* {"group": "formula", "displayType": "function", "displayName": "向上取整", "insertText": "Ceiling(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回传入数字向上取整的结果" , "definition": "Ceiling(数字):数字"}
|
|
734
|
+
*/
|
|
315
735
|
function Ceiling(num: number): number;
|
|
736
|
+
/**
|
|
737
|
+
* 四舍五入
|
|
738
|
+
*
|
|
739
|
+
* @remarks
|
|
740
|
+
* 返回传入数字四舍五入后的结果
|
|
741
|
+
*
|
|
742
|
+
* @privateForWeDa
|
|
743
|
+
* {"group": "formula", "displayType": "function", "displayName": "四舍五入", "insertText": "Round(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回传入数字四舍五入后的结果" , "definition": "Round(数字):数字"}
|
|
744
|
+
*/
|
|
316
745
|
function Round(num: number): number;
|
|
746
|
+
/**
|
|
747
|
+
* 求和
|
|
748
|
+
*
|
|
749
|
+
* @remarks
|
|
750
|
+
* 返回一组数字中的和
|
|
751
|
+
*
|
|
752
|
+
* @privateForWeDa
|
|
753
|
+
* {"group": "formula", "displayType": "function", "displayName": "求和", "insertText": "Sum(1, 2)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回一组数字中的和" , "definition": "Sum(数字1, [数字2, ...]):数字"}
|
|
754
|
+
*/
|
|
317
755
|
function Sum(...args: number[]): number;
|
|
756
|
+
/**
|
|
757
|
+
* 随机数
|
|
758
|
+
*
|
|
759
|
+
* @remarks
|
|
760
|
+
* 返回一个指定范围的伪随机数,例如 Rand(10),返回一个范围在 10 以内的随机数
|
|
761
|
+
*
|
|
762
|
+
* @privateForWeDa
|
|
763
|
+
* {"group": "formula", "displayType": "function", "displayName": "随机数", "insertText": "Rand(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回一个指定范围的伪随机数,例如 Rand(10),返回一个范围在 10 以内的随机数" , "definition": "Rand(数字):数字"}
|
|
764
|
+
*/
|
|
318
765
|
function Rand(num: number): number;
|
|
319
766
|
|
|
320
767
|
interface IIfObjectParam {
|
|
@@ -322,49 +769,368 @@ condition: boolean;
|
|
|
322
769
|
consequent?: any;
|
|
323
770
|
alternate?: any;
|
|
324
771
|
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
772
|
+
/**
|
|
773
|
+
* 条件分支
|
|
774
|
+
*
|
|
775
|
+
* @remarks
|
|
776
|
+
* 按判断条件进行逻辑比较,满足时返回一个值,不满足时返回另一个值。
|
|
777
|
+
*
|
|
778
|
+
* @privateForWeDa
|
|
779
|
+
* {"group": "formula", "displayType": "function", "displayName": "条件分支", "insertText": "If(true, '您好', 'hello')", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "按判断条件进行逻辑比较,满足时返回一个值,不满足时返回另一个值。" , "definition": "If(判断条件, 满足时返回的值, 不满足时返回的值):任何类型"}
|
|
780
|
+
*/
|
|
330
781
|
function If(params: IIfObjectParam): any;
|
|
331
782
|
function If(condition: boolean, consequent?: any, alternate?: any): any;
|
|
783
|
+
/**
|
|
784
|
+
* 是否为空
|
|
785
|
+
*
|
|
786
|
+
* @remarks
|
|
787
|
+
* 判断传入的文本是否为空
|
|
788
|
+
*
|
|
789
|
+
* @privateForWeDa
|
|
790
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否为空", "insertText": "IsEmpty('hello')", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "判断传入的文本是否为空" , "definition": "IsEmpty(值):布尔值"}
|
|
791
|
+
*/
|
|
332
792
|
function IsEmpty(text: string | string[]): boolean;
|
|
793
|
+
/**
|
|
794
|
+
* 是否为null
|
|
795
|
+
*
|
|
796
|
+
* @remarks
|
|
797
|
+
* 判断传入的字段值是否包含数据,即不为 NULL
|
|
798
|
+
*
|
|
799
|
+
* @privateForWeDa
|
|
800
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否为null", "insertText": "NotNull(null)", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "判断传入的字段值是否包含数据,即不为 NULL" , "definition": "NotNull(字段):布尔值"}
|
|
801
|
+
*/
|
|
333
802
|
function NotNull(val: any): boolean;
|
|
803
|
+
/**
|
|
804
|
+
* 与
|
|
805
|
+
*
|
|
806
|
+
* @remarks
|
|
807
|
+
* 用于确定所有判断条件是否为真
|
|
808
|
+
*
|
|
809
|
+
* @privateForWeDa
|
|
810
|
+
* {"group": "formula", "displayType": "function", "displayName": "与", "insertText": "And(true, false)", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "用于确定所有判断条件是否为真" , "definition": "And(判断条件1, [判断条件2,...]):布尔值"}
|
|
811
|
+
*/
|
|
334
812
|
function And(...args: boolean[]): boolean;
|
|
813
|
+
/**
|
|
814
|
+
* 或
|
|
815
|
+
*
|
|
816
|
+
* @remarks
|
|
817
|
+
* 任意一个判断条件为真,则结果为真;所有条件为否,结果才为否
|
|
818
|
+
*
|
|
819
|
+
* @privateForWeDa
|
|
820
|
+
* {"group": "formula", "displayType": "function", "displayName": "或", "insertText": "Or(true, false)", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "任意一个判断条件为真,则结果为真;所有条件为否,结果才为否" , "definition": "Or(判断条件1, [判断条件2,...]):布尔值"}
|
|
821
|
+
*/
|
|
335
822
|
function Or(...args: boolean[]): boolean;
|
|
336
823
|
|
|
824
|
+
/**
|
|
825
|
+
* 获取文本长度
|
|
826
|
+
*
|
|
827
|
+
* @remarks
|
|
828
|
+
* 获取传入文本的字符数
|
|
829
|
+
*
|
|
830
|
+
* @privateForWeDa
|
|
831
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取文本长度", "insertText": "Len('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "获取传入文本的字符数" , "definition": "Len(文本):数字"}
|
|
832
|
+
*/
|
|
337
833
|
function Len(text: string): number;
|
|
834
|
+
/**
|
|
835
|
+
* 是否包含指定文本
|
|
836
|
+
*
|
|
837
|
+
* @remarks
|
|
838
|
+
* 判断文本 1 是否包含文本 2
|
|
839
|
+
*
|
|
840
|
+
* @privateForWeDa
|
|
841
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否包含指定文本", "insertText": "Contains('文本1', '文本2')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "判断文本 1 是否包含文本 2" , "definition": "Contains(文本1, 文本2):布尔值"}
|
|
842
|
+
*/
|
|
338
843
|
function Contains(text1: string, text2: string): boolean;
|
|
844
|
+
/**
|
|
845
|
+
* 拆分文本
|
|
846
|
+
*
|
|
847
|
+
* @remarks
|
|
848
|
+
* 根据传入的文本 2,将文本 1 拆分成文本数组,例如 Split("张三,李四,王五", ",")
|
|
849
|
+
*
|
|
850
|
+
* @privateForWeDa
|
|
851
|
+
* {"group": "formula", "displayType": "function", "displayName": "拆分文本", "insertText": "Split('文本1', '文本2')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据传入的文本 2,将文本 1 拆分成文本数组,例如 Split('张三,李四,王五', ',')" , "definition": "Split(文本1,文本2):文本数组"}
|
|
852
|
+
*/
|
|
339
853
|
function Split(text1: string, text2: string): string[];
|
|
854
|
+
/**
|
|
855
|
+
* 删除开头/结尾空格和制表符
|
|
856
|
+
*
|
|
857
|
+
* @remarks
|
|
858
|
+
* 删除文本开头和结尾的所有空格和制表符,文本中间的空格和制表符不会删除
|
|
859
|
+
*
|
|
860
|
+
* @privateForWeDa
|
|
861
|
+
* {"group": "formula", "displayType": "function", "displayName": "删除开头/结尾空格和制表符", "insertText": "Trim('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "删除文本开头和结尾的所有空格和制表符,文本中间的空格和制表符不会删除" , "definition": "Trim(文本):文本"}
|
|
862
|
+
*/
|
|
340
863
|
function Trim(text: string): string;
|
|
864
|
+
/**
|
|
865
|
+
* 转换为大写
|
|
866
|
+
*
|
|
867
|
+
* @remarks
|
|
868
|
+
* 将传入的文本转为全大写文本
|
|
869
|
+
*
|
|
870
|
+
* @privateForWeDa
|
|
871
|
+
* {"group": "formula", "displayType": "function", "displayName": "转换为大写", "insertText": "Upper('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "将传入的文本转为全大写文本" , "definition": "Upper(文本):文本"}
|
|
872
|
+
*/
|
|
341
873
|
function Upper(text: string): string;
|
|
874
|
+
/**
|
|
875
|
+
* 转换为小写
|
|
876
|
+
*
|
|
877
|
+
* @remarks
|
|
878
|
+
* 将传入的文本转为全小写文本
|
|
879
|
+
*
|
|
880
|
+
* @privateForWeDa
|
|
881
|
+
* {"group": "formula", "displayType": "function", "displayName": "转换为小写", "insertText": "Lower('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "将传入的文本转为全小写文本" , "definition": "Lower(文本):文本"}
|
|
882
|
+
*/
|
|
342
883
|
function Lower(text: string): string;
|
|
884
|
+
/**
|
|
885
|
+
* 文本拼接
|
|
886
|
+
*
|
|
887
|
+
* @remarks
|
|
888
|
+
* 返回多个文本拼接后的新文本
|
|
889
|
+
*
|
|
890
|
+
* @privateForWeDa
|
|
891
|
+
* {"group": "formula", "displayType": "function", "displayName": "文本拼接", "insertText": "Concat('文本1', '文本2')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回多个文本拼接后的新文本" , "definition": "Concat(文本1, [文本2,...]):文本"}
|
|
892
|
+
*/
|
|
343
893
|
function Concat(...text: string[]): string;
|
|
344
894
|
|
|
895
|
+
/**
|
|
896
|
+
* 获取现在时间
|
|
897
|
+
*
|
|
898
|
+
* @remarks
|
|
899
|
+
* 返回当前系统时间,通常与其他日期时间函数搭配使用
|
|
900
|
+
*
|
|
901
|
+
* @privateForWeDa
|
|
902
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取现在时间", "insertText": "Now()", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回当前系统时间,通常与其他日期时间函数搭配使用" , "definition": "Now():日期时间"}
|
|
903
|
+
*/
|
|
345
904
|
function Now(): number;
|
|
905
|
+
/**
|
|
906
|
+
* 获取时间戳
|
|
907
|
+
*
|
|
908
|
+
* @remarks
|
|
909
|
+
* 根据输入的日期时间返回时间戳
|
|
910
|
+
*
|
|
911
|
+
* @privateForWeDa
|
|
912
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取时间戳", "insertText": "Timestamp(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回时间戳" , "definition": "Timestamp(日期时间):日期时间"}
|
|
913
|
+
*/
|
|
346
914
|
function Timestamp(arg: number | string | Date): number;
|
|
915
|
+
/**
|
|
916
|
+
* 获取秒数
|
|
917
|
+
*
|
|
918
|
+
* @remarks
|
|
919
|
+
* 根据输入的日期时间返回该时间的秒数
|
|
920
|
+
*
|
|
921
|
+
* @privateForWeDa
|
|
922
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取秒数", "insertText": "Second(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的秒数" , "definition": "Second(日期时间):数字"}
|
|
923
|
+
*/
|
|
347
924
|
function Second(arg: number | string | Date): number;
|
|
925
|
+
/**
|
|
926
|
+
* 获取分钟数
|
|
927
|
+
*
|
|
928
|
+
* @remarks
|
|
929
|
+
* 根据输入的日期时间返回该时间的分钟部分
|
|
930
|
+
*
|
|
931
|
+
* @privateForWeDa
|
|
932
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取分钟数", "insertText": "Minute(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的分钟部分" , "definition": "Minute(日期时间):数字"}
|
|
933
|
+
*/
|
|
348
934
|
function Minute(arg: number | string | Date): number;
|
|
935
|
+
/**
|
|
936
|
+
* 获取小时数
|
|
937
|
+
*
|
|
938
|
+
* @remarks
|
|
939
|
+
* 根据输入的日期时间返回该时间的小时部分,24小时制
|
|
940
|
+
*
|
|
941
|
+
* @privateForWeDa
|
|
942
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取小时数", "insertText": "Hour(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的小时部分,24小时制" , "definition": "Hour(日期时间):数字"}
|
|
943
|
+
*/
|
|
349
944
|
function Hour(arg: number | string | Date): number;
|
|
945
|
+
/**
|
|
946
|
+
* 获取天数
|
|
947
|
+
*
|
|
948
|
+
* @remarks
|
|
949
|
+
* 根据输入的日期时间返回该时间的日部分,范围为 1-31
|
|
950
|
+
*
|
|
951
|
+
* @privateForWeDa
|
|
952
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取天数", "insertText": "Day(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的日部分,范围为 1-31" , "definition": "Day(日期时间):数字"}
|
|
953
|
+
*/
|
|
350
954
|
function Day(arg: number | string | Date): number;
|
|
955
|
+
/**
|
|
956
|
+
* 获取星期数
|
|
957
|
+
*
|
|
958
|
+
* @remarks
|
|
959
|
+
* 根据输入的日期时间返回该时间的星期数
|
|
960
|
+
*
|
|
961
|
+
* @privateForWeDa
|
|
962
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取星期数", "insertText": "DayOfWeek(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的星期数" , "definition": "DayOfWeek(日期时间):数字"}
|
|
963
|
+
*/
|
|
351
964
|
function DayOfWeek(arg: number | string | Date): number;
|
|
965
|
+
/**
|
|
966
|
+
* 获取月数
|
|
967
|
+
*
|
|
968
|
+
* @remarks
|
|
969
|
+
* 根据输入的日期时间返回该时间的月份
|
|
970
|
+
*
|
|
971
|
+
* @privateForWeDa
|
|
972
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取月数", "insertText": "Month(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的月份" , "definition": "Month(日期时间):数字"}
|
|
973
|
+
*/
|
|
352
974
|
function Month(arg: number | string | Date): number;
|
|
975
|
+
/**
|
|
976
|
+
* 获取年份
|
|
977
|
+
*
|
|
978
|
+
* @remarks
|
|
979
|
+
* 根据输入的日期时间返回该时间的年份
|
|
980
|
+
*
|
|
981
|
+
* @privateForWeDa
|
|
982
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取年份", "insertText": "Year(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的年份" , "definition": "Year(日期时间):数字"}
|
|
983
|
+
*/
|
|
353
984
|
function Year(arg: number | string | Date): number;
|
|
985
|
+
/**
|
|
986
|
+
* 使用年月日创建日期时间
|
|
987
|
+
*
|
|
988
|
+
* @remarks
|
|
989
|
+
* 根据输入的年月日数值返回一个日期类型的数据,例如 GetDate(2017,3,24)
|
|
990
|
+
*
|
|
991
|
+
* @privateForWeDa
|
|
992
|
+
* {"group": "formula", "displayType": "function", "displayName": "使用年月日创建日期时间", "insertText": "GetDate(2011, 7, 2)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的年月日数值返回一个日期类型的数据,例如 GetDate(2017,3,24)" , "definition": "GetDate(数字,数字,数字):日期时间"}
|
|
993
|
+
*/
|
|
354
994
|
function GetDate(year: number, month: number, day: number): number;
|
|
995
|
+
/**
|
|
996
|
+
* 使用时间日期文本创建日期时间
|
|
997
|
+
*
|
|
998
|
+
* @remarks
|
|
999
|
+
* 将日期时间文本根据指定格式转化为日期时间,例如 DateTimeValue("2021-12-11 01:19:12", "yyyy-MM-dd HH:mm:ss")
|
|
1000
|
+
*
|
|
1001
|
+
* @privateForWeDa
|
|
1002
|
+
* {"group": "formula", "displayType": "function", "displayName": "使用时间日期文本创建日期时间", "insertText": "DateTimeValue('2011-07-02', 'YYYY:MM:DD')", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "将日期时间文本根据指定格式转化为日期时间,例如 DateTimeValue('2021-12-11 01:19:12', 'yyyy-MM-dd HH:mm:ss')" , "definition": "DateTimeValue(文本, 文本):日期时间"}
|
|
1003
|
+
*/
|
|
355
1004
|
function DateTimeValue(arg: string, val: string): number;
|
|
1005
|
+
/**
|
|
1006
|
+
* 计算年龄
|
|
1007
|
+
*
|
|
1008
|
+
* @remarks
|
|
1009
|
+
* 根据输入的两个日期时间计算出年龄,例如 Age(Date(2017,3,24), Date(2021,3,24))
|
|
1010
|
+
*
|
|
1011
|
+
* @privateForWeDa
|
|
1012
|
+
* {"group": "formula", "displayType": "function", "displayName": "计算年龄", "insertText": "Age(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的两个日期时间计算出年龄,例如 Age(Date(2017,3,24), Date(2021,3,24))" , "definition": "Age(日期时间,日期时间):数字"}
|
|
1013
|
+
*/
|
|
356
1014
|
function Age(arg: number | string | Date, val: number | string | Date): number;
|
|
1015
|
+
/**
|
|
1016
|
+
* 计算当前年龄
|
|
1017
|
+
*
|
|
1018
|
+
* @remarks
|
|
1019
|
+
* 计算当前年龄,例如 AgeOfNow(Date(2017,3,24))
|
|
1020
|
+
*
|
|
1021
|
+
* @privateForWeDa
|
|
1022
|
+
* {"group": "formula", "displayType": "function", "displayName": "计算当前年龄", "insertText": "AgeOfNow(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "计算当前年龄,例如 AgeOfNow(Date(2017,3,24))" , "definition": "AgeOfNow(日期时间):数字"}
|
|
1023
|
+
*/
|
|
357
1024
|
function AgeOfNow(arg: number | string | Date): number;
|
|
1025
|
+
/**
|
|
1026
|
+
* 增加 X 天
|
|
1027
|
+
*
|
|
1028
|
+
* @remarks
|
|
1029
|
+
* 在传入的日期时间上增加 X 天,支持负数
|
|
1030
|
+
*
|
|
1031
|
+
* @privateForWeDa
|
|
1032
|
+
* {"group": "formula", "displayType": "function", "displayName": "增加 X 天", "insertText": "DateAdd(1661334203345, 1)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "在传入的日期时间上增加 X 天,支持负数" , "definition": "DateAdd(日期时间, 数字):日期时间"}
|
|
1033
|
+
*/
|
|
358
1034
|
function DateAdd(arg: number | string | Date, day: number): number;
|
|
1035
|
+
/**
|
|
1036
|
+
* 增加 X 月
|
|
1037
|
+
*
|
|
1038
|
+
* @remarks
|
|
1039
|
+
* 在传入的日期和时间上增加 X 月,支持负数
|
|
1040
|
+
*
|
|
1041
|
+
* @privateForWeDa
|
|
1042
|
+
* {"group": "formula", "displayType": "function", "displayName": "增加 X 月", "insertText": "MonthAdd(1661334203345, 1)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "在传入的日期和时间上增加 X 月,支持负数" , "definition": "MonthAdd(日期时间, 数字):日期时间"}
|
|
1043
|
+
*/
|
|
359
1044
|
function MonthAdd(arg: number | string | Date, month: number): number;
|
|
1045
|
+
/**
|
|
1046
|
+
* 增加 X 年
|
|
1047
|
+
*
|
|
1048
|
+
* @remarks
|
|
1049
|
+
* 在传入的日期和时间上增加 X 年,支持负数
|
|
1050
|
+
*
|
|
1051
|
+
* @privateForWeDa
|
|
1052
|
+
* {"group": "formula", "displayType": "function", "displayName": "增加 X 年", "insertText": "YearAdd(1661334203345, 1)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "在传入的日期和时间上增加 X 年,支持负数" , "definition": "YearAdd(日期时间, 数字):日期时间"}
|
|
1053
|
+
*/
|
|
360
1054
|
function YearAdd(arg: number | string | Date, year: number): number;
|
|
1055
|
+
/**
|
|
1056
|
+
* 天数差
|
|
1057
|
+
*
|
|
1058
|
+
* @remarks
|
|
1059
|
+
* 返回两个日期时间字段之间的天数差,如果为同一天,差数为零
|
|
1060
|
+
*
|
|
1061
|
+
* @privateForWeDa
|
|
1062
|
+
* {"group": "formula", "displayType": "function", "displayName": "天数差", "insertText": "DateDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的天数差,如果为同一天,差数为零" , "definition": "DateDiff(日期时间, 日期时间):数字"}
|
|
1063
|
+
*/
|
|
361
1064
|
function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1065
|
+
/**
|
|
1066
|
+
* 小时差
|
|
1067
|
+
*
|
|
1068
|
+
* @remarks
|
|
1069
|
+
* 返回两个日期时间字段之间的小时差,如果为同一小时,差数为零
|
|
1070
|
+
*
|
|
1071
|
+
* @privateForWeDa
|
|
1072
|
+
* {"group": "formula", "displayType": "function", "displayName": "小时差", "insertText": "HourDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的小时差,如果为同一小时,差数为零" , "definition": "HourDiff(日期时间, 日期时间):数字"}
|
|
1073
|
+
*/
|
|
362
1074
|
function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1075
|
+
/**
|
|
1076
|
+
* 分钟差
|
|
1077
|
+
*
|
|
1078
|
+
* @remarks
|
|
1079
|
+
* 返回两个日期时间字段之间的分钟差,如果为同一分钟,差数为零
|
|
1080
|
+
*
|
|
1081
|
+
* @privateForWeDa
|
|
1082
|
+
* {"group": "formula", "displayType": "function", "displayName": "分钟差", "insertText": "MinuteDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的分钟差,如果为同一分钟,差数为零" , "definition": "MinuteDiff(日期时间, 日期时间):数字"}
|
|
1083
|
+
*/
|
|
363
1084
|
function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1085
|
+
/**
|
|
1086
|
+
* 秒数差
|
|
1087
|
+
*
|
|
1088
|
+
* @remarks
|
|
1089
|
+
* 返回两个日期时间字段之间的天数差,如果为同一天,差数为零
|
|
1090
|
+
*
|
|
1091
|
+
* @privateForWeDa
|
|
1092
|
+
* {"group": "formula", "displayType": "function", "displayName": "秒数差", "insertText": "SecondDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的天数差,如果为同一天,差数为零" , "definition": "SecondDiff(日期时间, 日期时间):数字"}
|
|
1093
|
+
*/
|
|
364
1094
|
function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1095
|
+
/**
|
|
1096
|
+
* 月数差
|
|
1097
|
+
*
|
|
1098
|
+
* @remarks
|
|
1099
|
+
* 返回两个日期时间字段之间的月数差,如果为同一月,差数为零
|
|
1100
|
+
*
|
|
1101
|
+
* @privateForWeDa
|
|
1102
|
+
* {"group": "formula", "displayType": "function", "displayName": "月数差", "insertText": "MonthDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的月数差,如果为同一月,差数为零" , "definition": "MonthDiff(日期时间, 日期时间):数字"}
|
|
1103
|
+
*/
|
|
365
1104
|
function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1105
|
+
/**
|
|
1106
|
+
* 年数差
|
|
1107
|
+
*
|
|
1108
|
+
* @remarks
|
|
1109
|
+
* 返回两个日期时间字段之间的年数差,如果为同一年,差数为零
|
|
1110
|
+
*
|
|
1111
|
+
* @privateForWeDa
|
|
1112
|
+
* {"group": "formula", "displayType": "function", "displayName": "年数差", "insertText": "YearDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的年数差,如果为同一年,差数为零" , "definition": "YearDiff(日期时间, 日期时间):数字"}
|
|
1113
|
+
*/
|
|
366
1114
|
function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1115
|
+
/**
|
|
1116
|
+
* 日期时间格式化
|
|
1117
|
+
*
|
|
1118
|
+
* @remarks
|
|
1119
|
+
* 格式化日期时间为指定格式的文本,例如 DateText(Date(2017,3,24), "yyyy-MM-dd HH:mm:ss")
|
|
1120
|
+
*
|
|
1121
|
+
* @privateForWeDa
|
|
1122
|
+
* {"group": "formula", "displayType": "function", "displayName": "日期时间格式化", "insertText": "DateText(1661334203345, 'YYYY-MM-DD HH:mm:ss')", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "格式化日期时间为指定格式的文本,例如 DateText(Date(2017,3,24), 'yyyy-MM-dd HH:mm:ss')" , "definition": "DateText(日期时间, 文本):文本"}
|
|
1123
|
+
*/
|
|
367
1124
|
function DateText(createdTime: number | string | Date, text: string): string;
|
|
1125
|
+
/**
|
|
1126
|
+
* 是否为今天
|
|
1127
|
+
*
|
|
1128
|
+
* @remarks
|
|
1129
|
+
* 判断传入的日期时间是否为今天,例如 IsToday(Date(2022,4,8))
|
|
1130
|
+
*
|
|
1131
|
+
* @privateForWeDa
|
|
1132
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否为今天", "insertText": "IsToday(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "判断传入的日期时间是否为今天,例如 IsToday(Date(2022,4,8))" , "definition": "IsToday(日期时间):布尔值"}
|
|
1133
|
+
*/
|
|
368
1134
|
function IsToday(date: number | string | Date): boolean;
|
|
369
1135
|
|
|
370
1136
|
|
|
@@ -388,28 +1154,62 @@ declare const forItems = $for;
|
|
|
388
1154
|
|
|
389
1155
|
// $page Begin
|
|
390
1156
|
declare namespace $page {
|
|
391
|
-
|
|
1157
|
+
/**
|
|
1158
|
+
* 页面 ID
|
|
1159
|
+
*
|
|
1160
|
+
* @privateForWeDa
|
|
1161
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "页面 ID"}
|
|
1162
|
+
*/
|
|
1163
|
+
const id: string;
|
|
1164
|
+
/**
|
|
1165
|
+
* 页面名称
|
|
1166
|
+
*
|
|
1167
|
+
* @privateForWeDa
|
|
1168
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "页面名称"}
|
|
1169
|
+
*/
|
|
392
1170
|
const label: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* 页面路径
|
|
1173
|
+
*
|
|
1174
|
+
* @privateForWeDa
|
|
1175
|
+
* {"group": "sysVar", "displayType": "string", "displayName": "页面路径"}
|
|
1176
|
+
*/
|
|
393
1177
|
const path: string;
|
|
394
1178
|
|
|
1179
|
+
/**
|
|
1180
|
+
* 页面数据对象
|
|
1181
|
+
*/
|
|
395
1182
|
namespace dataset {
|
|
1183
|
+
/**
|
|
1184
|
+
* 页面变量
|
|
1185
|
+
*/
|
|
396
1186
|
const state: {
|
|
397
1187
|
// Page State Inner Begin
|
|
398
1188
|
// Page State 页面变量 - Don't touch me
|
|
399
1189
|
// Page State Inner End
|
|
400
1190
|
};
|
|
1191
|
+
/**
|
|
1192
|
+
* 页面参数
|
|
1193
|
+
*/
|
|
401
1194
|
const params: {
|
|
402
1195
|
// Page Param Inner Begin
|
|
403
1196
|
// Page Param 页面参数 - Don't touch me
|
|
404
1197
|
// Page Param Inner End
|
|
405
1198
|
};
|
|
406
1199
|
}
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* 页面定义 handler 方法
|
|
1203
|
+
*/
|
|
407
1204
|
namespace handler {
|
|
408
1205
|
// Page Handler Inner Begin
|
|
409
1206
|
// Page Handler 页面方法 - Don't touch me
|
|
410
1207
|
// Page Handler Inner End
|
|
411
1208
|
}
|
|
412
1209
|
|
|
1210
|
+
/**
|
|
1211
|
+
* 设置页面变量
|
|
1212
|
+
*/
|
|
413
1213
|
function setState(userSetState: Record<string, any>): void;
|
|
414
1214
|
|
|
415
1215
|
}
|
|
@@ -449,14 +1249,95 @@ declare namespace $comp {
|
|
|
449
1249
|
|
|
450
1250
|
// Global Formula Begin
|
|
451
1251
|
|
|
1252
|
+
/**
|
|
1253
|
+
* 绝对值
|
|
1254
|
+
*
|
|
1255
|
+
* @remarks
|
|
1256
|
+
* 计算传入数字的绝对值
|
|
1257
|
+
*
|
|
1258
|
+
* @privateForWeDa
|
|
1259
|
+
* {"group": "formula", "displayType": "function", "displayName": "绝对值", "insertText": "ABS(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "计算传入数字的绝对值" , "definition": "ABS(数字):数字"}
|
|
1260
|
+
*/
|
|
452
1261
|
declare function ABS(num: number): number;
|
|
1262
|
+
/**
|
|
1263
|
+
* 最小值
|
|
1264
|
+
*
|
|
1265
|
+
* @remarks
|
|
1266
|
+
* 返回一组数字中的最小值
|
|
1267
|
+
*
|
|
1268
|
+
* @privateForWeDa
|
|
1269
|
+
* {"group": "formula", "displayType": "function", "displayName": "最小值", "insertText": "Min(1, 2)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回一组数字中的最小值" , "definition": "Min(数字1, [数字2, ...]):数字"}
|
|
1270
|
+
*/
|
|
453
1271
|
declare function Min(...args: number[]): number;
|
|
1272
|
+
/**
|
|
1273
|
+
* 最大值
|
|
1274
|
+
*
|
|
1275
|
+
* @remarks
|
|
1276
|
+
* 返回一组数字中的最大值
|
|
1277
|
+
*
|
|
1278
|
+
* @privateForWeDa
|
|
1279
|
+
* {"group": "formula", "displayType": "function", "displayName": "最大值", "insertText": "Max(1, 2)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回一组数字中的最大值" , "definition": "Max(数字1, [数字2, ...]):数字"}
|
|
1280
|
+
*/
|
|
454
1281
|
declare function Max(...args: number[]): number;
|
|
1282
|
+
/**
|
|
1283
|
+
* 平均值
|
|
1284
|
+
*
|
|
1285
|
+
* @remarks
|
|
1286
|
+
* 返回一组数字中的平均值
|
|
1287
|
+
*
|
|
1288
|
+
* @privateForWeDa
|
|
1289
|
+
* {"group": "formula", "displayType": "function", "displayName": "平均值", "insertText": "Average(1, 2)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回一组数字中的平均值" , "definition": "Average(数字1, [数字2, ...]):数字"}
|
|
1290
|
+
*/
|
|
455
1291
|
declare function Average(...args: number[]): number;
|
|
1292
|
+
/**
|
|
1293
|
+
* 向下取整
|
|
1294
|
+
*
|
|
1295
|
+
* @remarks
|
|
1296
|
+
* 返回传入数字向下取整的结果
|
|
1297
|
+
*
|
|
1298
|
+
* @privateForWeDa
|
|
1299
|
+
* {"group": "formula", "displayType": "function", "displayName": "向下取整", "insertText": "Floor(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回传入数字向下取整的结果" , "definition": "Floor(数字):数字"}
|
|
1300
|
+
*/
|
|
456
1301
|
declare function Floor(num: number): number;
|
|
1302
|
+
/**
|
|
1303
|
+
* 向上取整
|
|
1304
|
+
*
|
|
1305
|
+
* @remarks
|
|
1306
|
+
* 返回传入数字向上取整的结果
|
|
1307
|
+
*
|
|
1308
|
+
* @privateForWeDa
|
|
1309
|
+
* {"group": "formula", "displayType": "function", "displayName": "向上取整", "insertText": "Ceiling(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回传入数字向上取整的结果" , "definition": "Ceiling(数字):数字"}
|
|
1310
|
+
*/
|
|
457
1311
|
declare function Ceiling(num: number): number;
|
|
1312
|
+
/**
|
|
1313
|
+
* 四舍五入
|
|
1314
|
+
*
|
|
1315
|
+
* @remarks
|
|
1316
|
+
* 返回传入数字四舍五入后的结果
|
|
1317
|
+
*
|
|
1318
|
+
* @privateForWeDa
|
|
1319
|
+
* {"group": "formula", "displayType": "function", "displayName": "四舍五入", "insertText": "Round(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回传入数字四舍五入后的结果" , "definition": "Round(数字):数字"}
|
|
1320
|
+
*/
|
|
458
1321
|
declare function Round(num: number): number;
|
|
1322
|
+
/**
|
|
1323
|
+
* 求和
|
|
1324
|
+
*
|
|
1325
|
+
* @remarks
|
|
1326
|
+
* 返回一组数字中的和
|
|
1327
|
+
*
|
|
1328
|
+
* @privateForWeDa
|
|
1329
|
+
* {"group": "formula", "displayType": "function", "displayName": "求和", "insertText": "Sum(1, 2)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回一组数字中的和" , "definition": "Sum(数字1, [数字2, ...]):数字"}
|
|
1330
|
+
*/
|
|
459
1331
|
declare function Sum(...args: number[]): number;
|
|
1332
|
+
/**
|
|
1333
|
+
* 随机数
|
|
1334
|
+
*
|
|
1335
|
+
* @remarks
|
|
1336
|
+
* 返回一个指定范围的伪随机数,例如 Rand(10),返回一个范围在 10 以内的随机数
|
|
1337
|
+
*
|
|
1338
|
+
* @privateForWeDa
|
|
1339
|
+
* {"group": "formula", "displayType": "function", "displayName": "随机数", "insertText": "Rand(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回一个指定范围的伪随机数,例如 Rand(10),返回一个范围在 10 以内的随机数" , "definition": "Rand(数字):数字"}
|
|
1340
|
+
*/
|
|
460
1341
|
declare function Rand(num: number): number;
|
|
461
1342
|
|
|
462
1343
|
declare interface IIfObjectParam {
|
|
@@ -464,51 +1345,376 @@ condition: boolean;
|
|
|
464
1345
|
consequent?: any;
|
|
465
1346
|
alternate?: any;
|
|
466
1347
|
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
1348
|
+
/**
|
|
1349
|
+
* 条件分支
|
|
1350
|
+
*
|
|
1351
|
+
* @remarks
|
|
1352
|
+
* 按判断条件进行逻辑比较,满足时返回一个值,不满足时返回另一个值。
|
|
1353
|
+
*
|
|
1354
|
+
* @privateForWeDa
|
|
1355
|
+
* {"group": "formula", "displayType": "function", "displayName": "条件分支", "insertText": "If(true, '您好', 'hello')", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "按判断条件进行逻辑比较,满足时返回一个值,不满足时返回另一个值。" , "definition": "If(判断条件, 满足时返回的值, 不满足时返回的值):任何类型"}
|
|
1356
|
+
*/
|
|
472
1357
|
declare function If(params: IIfObjectParam): any;
|
|
473
1358
|
declare function If(condition: boolean, consequent?: any, alternate?: any): any;
|
|
1359
|
+
/**
|
|
1360
|
+
* 是否为空
|
|
1361
|
+
*
|
|
1362
|
+
* @remarks
|
|
1363
|
+
* 判断传入的文本是否为空
|
|
1364
|
+
*
|
|
1365
|
+
* @privateForWeDa
|
|
1366
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否为空", "insertText": "IsEmpty('hello')", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "判断传入的文本是否为空" , "definition": "IsEmpty(值):布尔值"}
|
|
1367
|
+
*/
|
|
474
1368
|
declare function IsEmpty(text: string | string[]): boolean;
|
|
1369
|
+
/**
|
|
1370
|
+
* 是否为null
|
|
1371
|
+
*
|
|
1372
|
+
* @remarks
|
|
1373
|
+
* 判断传入的字段值是否包含数据,即不为 NULL
|
|
1374
|
+
*
|
|
1375
|
+
* @privateForWeDa
|
|
1376
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否为null", "insertText": "NotNull(null)", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "判断传入的字段值是否包含数据,即不为 NULL" , "definition": "NotNull(字段):布尔值"}
|
|
1377
|
+
*/
|
|
475
1378
|
declare function NotNull(val: any): boolean;
|
|
1379
|
+
/**
|
|
1380
|
+
* 与
|
|
1381
|
+
*
|
|
1382
|
+
* @remarks
|
|
1383
|
+
* 用于确定所有判断条件是否为真
|
|
1384
|
+
*
|
|
1385
|
+
* @privateForWeDa
|
|
1386
|
+
* {"group": "formula", "displayType": "function", "displayName": "与", "insertText": "And(true, false)", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "用于确定所有判断条件是否为真" , "definition": "And(判断条件1, [判断条件2,...]):布尔值"}
|
|
1387
|
+
*/
|
|
476
1388
|
declare function And(...args: boolean[]): boolean;
|
|
1389
|
+
/**
|
|
1390
|
+
* 或
|
|
1391
|
+
*
|
|
1392
|
+
* @remarks
|
|
1393
|
+
* 任意一个判断条件为真,则结果为真;所有条件为否,结果才为否
|
|
1394
|
+
*
|
|
1395
|
+
* @privateForWeDa
|
|
1396
|
+
* {"group": "formula", "displayType": "function", "displayName": "或", "insertText": "Or(true, false)", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "任意一个判断条件为真,则结果为真;所有条件为否,结果才为否" , "definition": "Or(判断条件1, [判断条件2,...]):布尔值"}
|
|
1397
|
+
*/
|
|
477
1398
|
declare function Or(...args: boolean[]): boolean;
|
|
478
1399
|
|
|
1400
|
+
/**
|
|
1401
|
+
* 获取文本长度
|
|
1402
|
+
*
|
|
1403
|
+
* @remarks
|
|
1404
|
+
* 获取传入文本的字符数
|
|
1405
|
+
*
|
|
1406
|
+
* @privateForWeDa
|
|
1407
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取文本长度", "insertText": "Len('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "获取传入文本的字符数" , "definition": "Len(文本):数字"}
|
|
1408
|
+
*/
|
|
479
1409
|
declare function Len(text: string): number;
|
|
1410
|
+
/**
|
|
1411
|
+
* 是否包含指定文本
|
|
1412
|
+
*
|
|
1413
|
+
* @remarks
|
|
1414
|
+
* 判断文本 1 是否包含文本 2
|
|
1415
|
+
*
|
|
1416
|
+
* @privateForWeDa
|
|
1417
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否包含指定文本", "insertText": "Contains('文本1', '文本2')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "判断文本 1 是否包含文本 2" , "definition": "Contains(文本1, 文本2):布尔值"}
|
|
1418
|
+
*/
|
|
480
1419
|
declare function Contains(text1: string, text2: string): boolean;
|
|
1420
|
+
/**
|
|
1421
|
+
* 拆分文本
|
|
1422
|
+
*
|
|
1423
|
+
* @remarks
|
|
1424
|
+
* 根据传入的文本 2,将文本 1 拆分成文本数组,例如 Split("张三,李四,王五", ",")
|
|
1425
|
+
*
|
|
1426
|
+
* @privateForWeDa
|
|
1427
|
+
* {"group": "formula", "displayType": "function", "displayName": "拆分文本", "insertText": "Split('文本1', '文本2')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据传入的文本 2,将文本 1 拆分成文本数组,例如 Split('张三,李四,王五', ',')" , "definition": "Split(文本1,文本2):文本数组"}
|
|
1428
|
+
*/
|
|
481
1429
|
declare function Split(text1: string, text2: string): string[];
|
|
1430
|
+
/**
|
|
1431
|
+
* 删除开头/结尾空格和制表符
|
|
1432
|
+
*
|
|
1433
|
+
* @remarks
|
|
1434
|
+
* 删除文本开头和结尾的所有空格和制表符,文本中间的空格和制表符不会删除
|
|
1435
|
+
*
|
|
1436
|
+
* @privateForWeDa
|
|
1437
|
+
* {"group": "formula", "displayType": "function", "displayName": "删除开头/结尾空格和制表符", "insertText": "Trim('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "删除文本开头和结尾的所有空格和制表符,文本中间的空格和制表符不会删除" , "definition": "Trim(文本):文本"}
|
|
1438
|
+
*/
|
|
482
1439
|
declare function Trim(text: string): string;
|
|
1440
|
+
/**
|
|
1441
|
+
* 转换为大写
|
|
1442
|
+
*
|
|
1443
|
+
* @remarks
|
|
1444
|
+
* 将传入的文本转为全大写文本
|
|
1445
|
+
*
|
|
1446
|
+
* @privateForWeDa
|
|
1447
|
+
* {"group": "formula", "displayType": "function", "displayName": "转换为大写", "insertText": "Upper('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "将传入的文本转为全大写文本" , "definition": "Upper(文本):文本"}
|
|
1448
|
+
*/
|
|
483
1449
|
declare function Upper(text: string): string;
|
|
1450
|
+
/**
|
|
1451
|
+
* 转换为小写
|
|
1452
|
+
*
|
|
1453
|
+
* @remarks
|
|
1454
|
+
* 将传入的文本转为全小写文本
|
|
1455
|
+
*
|
|
1456
|
+
* @privateForWeDa
|
|
1457
|
+
* {"group": "formula", "displayType": "function", "displayName": "转换为小写", "insertText": "Lower('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "将传入的文本转为全小写文本" , "definition": "Lower(文本):文本"}
|
|
1458
|
+
*/
|
|
484
1459
|
declare function Lower(text: string): string;
|
|
1460
|
+
/**
|
|
1461
|
+
* 文本拼接
|
|
1462
|
+
*
|
|
1463
|
+
* @remarks
|
|
1464
|
+
* 返回多个文本拼接后的新文本
|
|
1465
|
+
*
|
|
1466
|
+
* @privateForWeDa
|
|
1467
|
+
* {"group": "formula", "displayType": "function", "displayName": "文本拼接", "insertText": "Concat('文本1', '文本2')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回多个文本拼接后的新文本" , "definition": "Concat(文本1, [文本2,...]):文本"}
|
|
1468
|
+
*/
|
|
485
1469
|
declare function Concat(...text: string[]): string;
|
|
486
1470
|
|
|
1471
|
+
/**
|
|
1472
|
+
* 获取现在时间
|
|
1473
|
+
*
|
|
1474
|
+
* @remarks
|
|
1475
|
+
* 返回当前系统时间,通常与其他日期时间函数搭配使用
|
|
1476
|
+
*
|
|
1477
|
+
* @privateForWeDa
|
|
1478
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取现在时间", "insertText": "Now()", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回当前系统时间,通常与其他日期时间函数搭配使用" , "definition": "Now():日期时间"}
|
|
1479
|
+
*/
|
|
487
1480
|
declare function Now(): number;
|
|
1481
|
+
/**
|
|
1482
|
+
* 获取时间戳
|
|
1483
|
+
*
|
|
1484
|
+
* @remarks
|
|
1485
|
+
* 根据输入的日期时间返回时间戳
|
|
1486
|
+
*
|
|
1487
|
+
* @privateForWeDa
|
|
1488
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取时间戳", "insertText": "Timestamp(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回时间戳" , "definition": "Timestamp(日期时间):日期时间"}
|
|
1489
|
+
*/
|
|
488
1490
|
declare function Timestamp(arg: number | string | Date): number;
|
|
1491
|
+
/**
|
|
1492
|
+
* 获取秒数
|
|
1493
|
+
*
|
|
1494
|
+
* @remarks
|
|
1495
|
+
* 根据输入的日期时间返回该时间的秒数
|
|
1496
|
+
*
|
|
1497
|
+
* @privateForWeDa
|
|
1498
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取秒数", "insertText": "Second(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的秒数" , "definition": "Second(日期时间):数字"}
|
|
1499
|
+
*/
|
|
489
1500
|
declare function Second(arg: number | string | Date): number;
|
|
1501
|
+
/**
|
|
1502
|
+
* 获取分钟数
|
|
1503
|
+
*
|
|
1504
|
+
* @remarks
|
|
1505
|
+
* 根据输入的日期时间返回该时间的分钟部分
|
|
1506
|
+
*
|
|
1507
|
+
* @privateForWeDa
|
|
1508
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取分钟数", "insertText": "Minute(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的分钟部分" , "definition": "Minute(日期时间):数字"}
|
|
1509
|
+
*/
|
|
490
1510
|
declare function Minute(arg: number | string | Date): number;
|
|
1511
|
+
/**
|
|
1512
|
+
* 获取小时数
|
|
1513
|
+
*
|
|
1514
|
+
* @remarks
|
|
1515
|
+
* 根据输入的日期时间返回该时间的小时部分,24小时制
|
|
1516
|
+
*
|
|
1517
|
+
* @privateForWeDa
|
|
1518
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取小时数", "insertText": "Hour(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的小时部分,24小时制" , "definition": "Hour(日期时间):数字"}
|
|
1519
|
+
*/
|
|
491
1520
|
declare function Hour(arg: number | string | Date): number;
|
|
1521
|
+
/**
|
|
1522
|
+
* 获取天数
|
|
1523
|
+
*
|
|
1524
|
+
* @remarks
|
|
1525
|
+
* 根据输入的日期时间返回该时间的日部分,范围为 1-31
|
|
1526
|
+
*
|
|
1527
|
+
* @privateForWeDa
|
|
1528
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取天数", "insertText": "Day(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的日部分,范围为 1-31" , "definition": "Day(日期时间):数字"}
|
|
1529
|
+
*/
|
|
492
1530
|
declare function Day(arg: number | string | Date): number;
|
|
1531
|
+
/**
|
|
1532
|
+
* 获取星期数
|
|
1533
|
+
*
|
|
1534
|
+
* @remarks
|
|
1535
|
+
* 根据输入的日期时间返回该时间的星期数
|
|
1536
|
+
*
|
|
1537
|
+
* @privateForWeDa
|
|
1538
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取星期数", "insertText": "DayOfWeek(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的星期数" , "definition": "DayOfWeek(日期时间):数字"}
|
|
1539
|
+
*/
|
|
493
1540
|
declare function DayOfWeek(arg: number | string | Date): number;
|
|
1541
|
+
/**
|
|
1542
|
+
* 获取月数
|
|
1543
|
+
*
|
|
1544
|
+
* @remarks
|
|
1545
|
+
* 根据输入的日期时间返回该时间的月份
|
|
1546
|
+
*
|
|
1547
|
+
* @privateForWeDa
|
|
1548
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取月数", "insertText": "Month(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的月份" , "definition": "Month(日期时间):数字"}
|
|
1549
|
+
*/
|
|
494
1550
|
declare function Month(arg: number | string | Date): number;
|
|
1551
|
+
/**
|
|
1552
|
+
* 获取年份
|
|
1553
|
+
*
|
|
1554
|
+
* @remarks
|
|
1555
|
+
* 根据输入的日期时间返回该时间的年份
|
|
1556
|
+
*
|
|
1557
|
+
* @privateForWeDa
|
|
1558
|
+
* {"group": "formula", "displayType": "function", "displayName": "获取年份", "insertText": "Year(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的年份" , "definition": "Year(日期时间):数字"}
|
|
1559
|
+
*/
|
|
495
1560
|
declare function Year(arg: number | string | Date): number;
|
|
1561
|
+
/**
|
|
1562
|
+
* 使用年月日创建日期时间
|
|
1563
|
+
*
|
|
1564
|
+
* @remarks
|
|
1565
|
+
* 根据输入的年月日数值返回一个日期类型的数据,例如 GetDate(2017,3,24)
|
|
1566
|
+
*
|
|
1567
|
+
* @privateForWeDa
|
|
1568
|
+
* {"group": "formula", "displayType": "function", "displayName": "使用年月日创建日期时间", "insertText": "GetDate(2011, 7, 2)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的年月日数值返回一个日期类型的数据,例如 GetDate(2017,3,24)" , "definition": "GetDate(数字,数字,数字):日期时间"}
|
|
1569
|
+
*/
|
|
496
1570
|
declare function GetDate(year: number, month: number, day: number): number;
|
|
1571
|
+
/**
|
|
1572
|
+
* 使用时间日期文本创建日期时间
|
|
1573
|
+
*
|
|
1574
|
+
* @remarks
|
|
1575
|
+
* 将日期时间文本根据指定格式转化为日期时间,例如 DateTimeValue("2021-12-11 01:19:12", "yyyy-MM-dd HH:mm:ss")
|
|
1576
|
+
*
|
|
1577
|
+
* @privateForWeDa
|
|
1578
|
+
* {"group": "formula", "displayType": "function", "displayName": "使用时间日期文本创建日期时间", "insertText": "DateTimeValue('2011-07-02', 'YYYY:MM:DD')", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "将日期时间文本根据指定格式转化为日期时间,例如 DateTimeValue('2021-12-11 01:19:12', 'yyyy-MM-dd HH:mm:ss')" , "definition": "DateTimeValue(文本, 文本):日期时间"}
|
|
1579
|
+
*/
|
|
497
1580
|
declare function DateTimeValue(arg: string, val: string): number;
|
|
1581
|
+
/**
|
|
1582
|
+
* 计算年龄
|
|
1583
|
+
*
|
|
1584
|
+
* @remarks
|
|
1585
|
+
* 根据输入的两个日期时间计算出年龄,例如 Age(Date(2017,3,24), Date(2021,3,24))
|
|
1586
|
+
*
|
|
1587
|
+
* @privateForWeDa
|
|
1588
|
+
* {"group": "formula", "displayType": "function", "displayName": "计算年龄", "insertText": "Age(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的两个日期时间计算出年龄,例如 Age(Date(2017,3,24), Date(2021,3,24))" , "definition": "Age(日期时间,日期时间):数字"}
|
|
1589
|
+
*/
|
|
498
1590
|
declare function Age(arg: number | string | Date, val: number | string | Date): number;
|
|
1591
|
+
/**
|
|
1592
|
+
* 计算当前年龄
|
|
1593
|
+
*
|
|
1594
|
+
* @remarks
|
|
1595
|
+
* 计算当前年龄,例如 AgeOfNow(Date(2017,3,24))
|
|
1596
|
+
*
|
|
1597
|
+
* @privateForWeDa
|
|
1598
|
+
* {"group": "formula", "displayType": "function", "displayName": "计算当前年龄", "insertText": "AgeOfNow(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "计算当前年龄,例如 AgeOfNow(Date(2017,3,24))" , "definition": "AgeOfNow(日期时间):数字"}
|
|
1599
|
+
*/
|
|
499
1600
|
declare function AgeOfNow(arg: number | string | Date): number;
|
|
1601
|
+
/**
|
|
1602
|
+
* 增加 X 天
|
|
1603
|
+
*
|
|
1604
|
+
* @remarks
|
|
1605
|
+
* 在传入的日期时间上增加 X 天,支持负数
|
|
1606
|
+
*
|
|
1607
|
+
* @privateForWeDa
|
|
1608
|
+
* {"group": "formula", "displayType": "function", "displayName": "增加 X 天", "insertText": "DateAdd(1661334203345, 1)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "在传入的日期时间上增加 X 天,支持负数" , "definition": "DateAdd(日期时间, 数字):日期时间"}
|
|
1609
|
+
*/
|
|
500
1610
|
declare function DateAdd(arg: number | string | Date, day: number): number;
|
|
1611
|
+
/**
|
|
1612
|
+
* 增加 X 月
|
|
1613
|
+
*
|
|
1614
|
+
* @remarks
|
|
1615
|
+
* 在传入的日期和时间上增加 X 月,支持负数
|
|
1616
|
+
*
|
|
1617
|
+
* @privateForWeDa
|
|
1618
|
+
* {"group": "formula", "displayType": "function", "displayName": "增加 X 月", "insertText": "MonthAdd(1661334203345, 1)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "在传入的日期和时间上增加 X 月,支持负数" , "definition": "MonthAdd(日期时间, 数字):日期时间"}
|
|
1619
|
+
*/
|
|
501
1620
|
declare function MonthAdd(arg: number | string | Date, month: number): number;
|
|
1621
|
+
/**
|
|
1622
|
+
* 增加 X 年
|
|
1623
|
+
*
|
|
1624
|
+
* @remarks
|
|
1625
|
+
* 在传入的日期和时间上增加 X 年,支持负数
|
|
1626
|
+
*
|
|
1627
|
+
* @privateForWeDa
|
|
1628
|
+
* {"group": "formula", "displayType": "function", "displayName": "增加 X 年", "insertText": "YearAdd(1661334203345, 1)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "在传入的日期和时间上增加 X 年,支持负数" , "definition": "YearAdd(日期时间, 数字):日期时间"}
|
|
1629
|
+
*/
|
|
502
1630
|
declare function YearAdd(arg: number | string | Date, year: number): number;
|
|
1631
|
+
/**
|
|
1632
|
+
* 天数差
|
|
1633
|
+
*
|
|
1634
|
+
* @remarks
|
|
1635
|
+
* 返回两个日期时间字段之间的天数差,如果为同一天,差数为零
|
|
1636
|
+
*
|
|
1637
|
+
* @privateForWeDa
|
|
1638
|
+
* {"group": "formula", "displayType": "function", "displayName": "天数差", "insertText": "DateDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的天数差,如果为同一天,差数为零" , "definition": "DateDiff(日期时间, 日期时间):数字"}
|
|
1639
|
+
*/
|
|
503
1640
|
declare function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1641
|
+
/**
|
|
1642
|
+
* 小时差
|
|
1643
|
+
*
|
|
1644
|
+
* @remarks
|
|
1645
|
+
* 返回两个日期时间字段之间的小时差,如果为同一小时,差数为零
|
|
1646
|
+
*
|
|
1647
|
+
* @privateForWeDa
|
|
1648
|
+
* {"group": "formula", "displayType": "function", "displayName": "小时差", "insertText": "HourDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的小时差,如果为同一小时,差数为零" , "definition": "HourDiff(日期时间, 日期时间):数字"}
|
|
1649
|
+
*/
|
|
504
1650
|
declare function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1651
|
+
/**
|
|
1652
|
+
* 分钟差
|
|
1653
|
+
*
|
|
1654
|
+
* @remarks
|
|
1655
|
+
* 返回两个日期时间字段之间的分钟差,如果为同一分钟,差数为零
|
|
1656
|
+
*
|
|
1657
|
+
* @privateForWeDa
|
|
1658
|
+
* {"group": "formula", "displayType": "function", "displayName": "分钟差", "insertText": "MinuteDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的分钟差,如果为同一分钟,差数为零" , "definition": "MinuteDiff(日期时间, 日期时间):数字"}
|
|
1659
|
+
*/
|
|
505
1660
|
declare function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1661
|
+
/**
|
|
1662
|
+
* 秒数差
|
|
1663
|
+
*
|
|
1664
|
+
* @remarks
|
|
1665
|
+
* 返回两个日期时间字段之间的天数差,如果为同一天,差数为零
|
|
1666
|
+
*
|
|
1667
|
+
* @privateForWeDa
|
|
1668
|
+
* {"group": "formula", "displayType": "function", "displayName": "秒数差", "insertText": "SecondDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的天数差,如果为同一天,差数为零" , "definition": "SecondDiff(日期时间, 日期时间):数字"}
|
|
1669
|
+
*/
|
|
506
1670
|
declare function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1671
|
+
/**
|
|
1672
|
+
* 月数差
|
|
1673
|
+
*
|
|
1674
|
+
* @remarks
|
|
1675
|
+
* 返回两个日期时间字段之间的月数差,如果为同一月,差数为零
|
|
1676
|
+
*
|
|
1677
|
+
* @privateForWeDa
|
|
1678
|
+
* {"group": "formula", "displayType": "function", "displayName": "月数差", "insertText": "MonthDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的月数差,如果为同一月,差数为零" , "definition": "MonthDiff(日期时间, 日期时间):数字"}
|
|
1679
|
+
*/
|
|
507
1680
|
declare function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1681
|
+
/**
|
|
1682
|
+
* 年数差
|
|
1683
|
+
*
|
|
1684
|
+
* @remarks
|
|
1685
|
+
* 返回两个日期时间字段之间的年数差,如果为同一年,差数为零
|
|
1686
|
+
*
|
|
1687
|
+
* @privateForWeDa
|
|
1688
|
+
* {"group": "formula", "displayType": "function", "displayName": "年数差", "insertText": "YearDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的年数差,如果为同一年,差数为零" , "definition": "YearDiff(日期时间, 日期时间):数字"}
|
|
1689
|
+
*/
|
|
508
1690
|
declare function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;
|
|
1691
|
+
/**
|
|
1692
|
+
* 日期时间格式化
|
|
1693
|
+
*
|
|
1694
|
+
* @remarks
|
|
1695
|
+
* 格式化日期时间为指定格式的文本,例如 DateText(Date(2017,3,24), "yyyy-MM-dd HH:mm:ss")
|
|
1696
|
+
*
|
|
1697
|
+
* @privateForWeDa
|
|
1698
|
+
* {"group": "formula", "displayType": "function", "displayName": "日期时间格式化", "insertText": "DateText(1661334203345, 'YYYY-MM-DD HH:mm:ss')", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "格式化日期时间为指定格式的文本,例如 DateText(Date(2017,3,24), 'yyyy-MM-dd HH:mm:ss')" , "definition": "DateText(日期时间, 文本):文本"}
|
|
1699
|
+
*/
|
|
509
1700
|
declare function DateText(createdTime: number | string | Date, text: string): string;
|
|
1701
|
+
/**
|
|
1702
|
+
* 是否为今天
|
|
1703
|
+
*
|
|
1704
|
+
* @remarks
|
|
1705
|
+
* 判断传入的日期时间是否为今天,例如 IsToday(Date(2022,4,8))
|
|
1706
|
+
*
|
|
1707
|
+
* @privateForWeDa
|
|
1708
|
+
* {"group": "formula", "displayType": "function", "displayName": "是否为今天", "insertText": "IsToday(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "判断传入的日期时间是否为今天,例如 IsToday(Date(2022,4,8))" , "definition": "IsToday(日期时间):布尔值"}
|
|
1709
|
+
*/
|
|
510
1710
|
declare function IsToday(date: number | string | Date): boolean;
|
|
511
1711
|
|
|
512
1712
|
|
|
513
1713
|
// Global Formula End
|
|
1714
|
+
|
|
1715
|
+
// event 支持 detail 等对象
|
|
1716
|
+
interface Event {
|
|
1717
|
+
detail: any
|
|
1718
|
+
}
|
|
1719
|
+
var event: Event | undefined
|
|
514
1720
|
`;
|