@cloudbase/cals 1.0.3-alpha.15 → 1.0.3-alpha.17

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.
Files changed (32) hide show
  1. package/lib/parser/.DS_Store +0 -0
  2. package/lib/parser/cals/index.d.ts +2 -1
  3. package/lib/parser/cals/index.d.ts.map +1 -1
  4. package/lib/parser/cals/index.js +25 -12
  5. package/lib/parser/cals/utils/block/index.d.ts.map +1 -1
  6. package/lib/parser/cals/utils/block/index.js +7 -3
  7. package/lib/parser/cals/utils/code/index.d.ts.map +1 -1
  8. package/lib/parser/cals/utils/code/index.js +18 -12
  9. package/lib/parser/cals/utils/runtime.d.ts.map +1 -1
  10. package/lib/parser/cals/utils/runtime.js +5 -2
  11. package/lib/parser/cals/utils/style.d.ts.map +1 -1
  12. package/lib/parser/cals/utils/style.js +7 -3
  13. package/lib/parser/cals/utils/version/common.d.ts.map +1 -1
  14. package/lib/parser/cals/utils/version/common.js +16 -33
  15. package/lib/parser/cals/utils/version/parses.d.ts.map +1 -1
  16. package/lib/parser/cals/utils/version/parses.js +18 -36
  17. package/lib/parser/cals/utils/version/utils.js +5 -2
  18. package/lib/parser/plugins/postcss-rpx2clac.js +2 -2
  19. package/lib/types/index.d.ts +1 -1
  20. package/lib/types/index.d.ts.map +1 -1
  21. package/lib/types/index.js +14 -1
  22. package/lib/types/lcds.d.ts +324 -211
  23. package/lib/types/lcds.d.ts.map +1 -1
  24. package/lib/utils/build.js +3 -3
  25. package/lib/utils/dts/auto-generated.d.ts +1 -1
  26. package/lib/utils/dts/auto-generated.d.ts.map +1 -1
  27. package/lib/utils/dts/auto-generated.js +1227 -35
  28. package/lib/utils/dts/index.d.ts +41 -4
  29. package/lib/utils/dts/index.d.ts.map +1 -1
  30. package/lib/utils/dts/index.js +384 -66
  31. package/lib/utils/version/migrations/version4.js +2 -2
  32. package/package.json +2 -1
@@ -21,21 +21,28 @@ exports.wedaDTS = `declare class UserWidget {
21
21
  // ========== 快捷访问方式 ========== //
22
22
 
23
23
  /**
24
- * 组件 id
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
- const id: string;
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
- interface CurrentUserInfo {
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
- // $w.utils
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
- // 显示 loading 提示
416
+ /**
417
+ * 显示全局加载中提示
418
+ */
156
419
  function showLoading(options);
157
420
 
158
- // 隐藏 loading 提示
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
- // sacnCode
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
- // $w.device
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
- // $w.env
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,137 @@ 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
- // $w.wedaContext
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
- const isEditorMode: boolean;
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
- function ABS(num: number): number;
668
+ /**
669
+ * 绝对值
670
+ *
671
+ * @remarks
672
+ * 计算传入数字的绝对值
673
+ *
674
+ * @privateForWeDa
675
+ * {"group": "formula", "displayType": "function", "displayName": "绝对值", "insertText": "ABS(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "计算传入数字的绝对值" , "definition": "ABS(数字):数字"}
676
+ */
677
+ function ABS(num: number): number;
678
+ /**
679
+ * 最小值
680
+ *
681
+ * @remarks
682
+ * 返回一组数字中的最小值
683
+ *
684
+ * @privateForWeDa
685
+ * {"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, ...]):数字"}
686
+ */
311
687
  function Min(...args: number[]): number;
688
+ /**
689
+ * 最大值
690
+ *
691
+ * @remarks
692
+ * 返回一组数字中的最大值
693
+ *
694
+ * @privateForWeDa
695
+ * {"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, ...]):数字"}
696
+ */
312
697
  function Max(...args: number[]): number;
698
+ /**
699
+ * 平均值
700
+ *
701
+ * @remarks
702
+ * 返回一组数字中的平均值
703
+ *
704
+ * @privateForWeDa
705
+ * {"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, ...]):数字"}
706
+ */
313
707
  function Average(...args: number[]): number;
708
+ /**
709
+ * 向下取整
710
+ *
711
+ * @remarks
712
+ * 返回传入数字向下取整的结果
713
+ *
714
+ * @privateForWeDa
715
+ * {"group": "formula", "displayType": "function", "displayName": "向下取整", "insertText": "Floor(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回传入数字向下取整的结果" , "definition": "Floor(数字):数字"}
716
+ */
314
717
  function Floor(num: number): number;
718
+ /**
719
+ * 向上取整
720
+ *
721
+ * @remarks
722
+ * 返回传入数字向上取整的结果
723
+ *
724
+ * @privateForWeDa
725
+ * {"group": "formula", "displayType": "function", "displayName": "向上取整", "insertText": "Ceiling(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回传入数字向上取整的结果" , "definition": "Ceiling(数字):数字"}
726
+ */
315
727
  function Ceiling(num: number): number;
728
+ /**
729
+ * 四舍五入
730
+ *
731
+ * @remarks
732
+ * 返回传入数字四舍五入后的结果
733
+ *
734
+ * @privateForWeDa
735
+ * {"group": "formula", "displayType": "function", "displayName": "四舍五入", "insertText": "Round(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回传入数字四舍五入后的结果" , "definition": "Round(数字):数字"}
736
+ */
316
737
  function Round(num: number): number;
738
+ /**
739
+ * 求和
740
+ *
741
+ * @remarks
742
+ * 返回一组数字中的和
743
+ *
744
+ * @privateForWeDa
745
+ * {"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, ...]):数字"}
746
+ */
317
747
  function Sum(...args: number[]): number;
748
+ /**
749
+ * 随机数
750
+ *
751
+ * @remarks
752
+ * 返回一个指定范围的伪随机数,例如 Rand(10),返回一个范围在 10 以内的随机数
753
+ *
754
+ * @privateForWeDa
755
+ * {"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(数字):数字"}
756
+ */
318
757
  function Rand(num: number): number;
319
758
 
320
759
  interface IIfObjectParam {
@@ -322,49 +761,368 @@ condition: boolean;
322
761
  consequent?: any;
323
762
  alternate?: any;
324
763
  }
325
- interface IIfObjectParam {
326
- condition: boolean;
327
- consequent?: any;
328
- alternate?: any;
329
- }
764
+ /**
765
+ * 条件分支
766
+ *
767
+ * @remarks
768
+ * 按判断条件进行逻辑比较,满足时返回一个值,不满足时返回另一个值。
769
+ *
770
+ * @privateForWeDa
771
+ * {"group": "formula", "displayType": "function", "displayName": "条件分支", "insertText": "If(true, '您好', 'hello')", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "按判断条件进行逻辑比较,满足时返回一个值,不满足时返回另一个值。" , "definition": "If(判断条件, 满足时返回的值, 不满足时返回的值):任何类型"}
772
+ */
330
773
  function If(params: IIfObjectParam): any;
331
774
  function If(condition: boolean, consequent?: any, alternate?: any): any;
775
+ /**
776
+ * 是否为空
777
+ *
778
+ * @remarks
779
+ * 判断传入的文本是否为空
780
+ *
781
+ * @privateForWeDa
782
+ * {"group": "formula", "displayType": "function", "displayName": "是否为空", "insertText": "IsEmpty('hello')", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "判断传入的文本是否为空" , "definition": "IsEmpty(值):布尔值"}
783
+ */
332
784
  function IsEmpty(text: string | string[]): boolean;
785
+ /**
786
+ * 是否为null
787
+ *
788
+ * @remarks
789
+ * 判断传入的字段值是否包含数据,即不为 NULL
790
+ *
791
+ * @privateForWeDa
792
+ * {"group": "formula", "displayType": "function", "displayName": "是否为null", "insertText": "NotNull(null)", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "判断传入的字段值是否包含数据,即不为 NULL" , "definition": "NotNull(字段):布尔值"}
793
+ */
333
794
  function NotNull(val: any): boolean;
795
+ /**
796
+ * 与
797
+ *
798
+ * @remarks
799
+ * 用于确定所有判断条件是否为真
800
+ *
801
+ * @privateForWeDa
802
+ * {"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,...]):布尔值"}
803
+ */
334
804
  function And(...args: boolean[]): boolean;
805
+ /**
806
+ * 或
807
+ *
808
+ * @remarks
809
+ * 任意一个判断条件为真,则结果为真;所有条件为否,结果才为否
810
+ *
811
+ * @privateForWeDa
812
+ * {"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,...]):布尔值"}
813
+ */
335
814
  function Or(...args: boolean[]): boolean;
336
815
 
816
+ /**
817
+ * 获取文本长度
818
+ *
819
+ * @remarks
820
+ * 获取传入文本的字符数
821
+ *
822
+ * @privateForWeDa
823
+ * {"group": "formula", "displayType": "function", "displayName": "获取文本长度", "insertText": "Len('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "获取传入文本的字符数" , "definition": "Len(文本):数字"}
824
+ */
337
825
  function Len(text: string): number;
826
+ /**
827
+ * 是否包含指定文本
828
+ *
829
+ * @remarks
830
+ * 判断文本 1 是否包含文本 2
831
+ *
832
+ * @privateForWeDa
833
+ * {"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):布尔值"}
834
+ */
338
835
  function Contains(text1: string, text2: string): boolean;
836
+ /**
837
+ * 拆分文本
838
+ *
839
+ * @remarks
840
+ * 根据传入的文本 2,将文本 1 拆分成文本数组,例如 Split("张三,李四,王五", ",")
841
+ *
842
+ * @privateForWeDa
843
+ * {"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):文本数组"}
844
+ */
339
845
  function Split(text1: string, text2: string): string[];
846
+ /**
847
+ * 删除开头/结尾空格和制表符
848
+ *
849
+ * @remarks
850
+ * 删除文本开头和结尾的所有空格和制表符,文本中间的空格和制表符不会删除
851
+ *
852
+ * @privateForWeDa
853
+ * {"group": "formula", "displayType": "function", "displayName": "删除开头/结尾空格和制表符", "insertText": "Trim('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "删除文本开头和结尾的所有空格和制表符,文本中间的空格和制表符不会删除" , "definition": "Trim(文本):文本"}
854
+ */
340
855
  function Trim(text: string): string;
856
+ /**
857
+ * 转换为大写
858
+ *
859
+ * @remarks
860
+ * 将传入的文本转为全大写文本
861
+ *
862
+ * @privateForWeDa
863
+ * {"group": "formula", "displayType": "function", "displayName": "转换为大写", "insertText": "Upper('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "将传入的文本转为全大写文本" , "definition": "Upper(文本):文本"}
864
+ */
341
865
  function Upper(text: string): string;
866
+ /**
867
+ * 转换为小写
868
+ *
869
+ * @remarks
870
+ * 将传入的文本转为全小写文本
871
+ *
872
+ * @privateForWeDa
873
+ * {"group": "formula", "displayType": "function", "displayName": "转换为小写", "insertText": "Lower('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "将传入的文本转为全小写文本" , "definition": "Lower(文本):文本"}
874
+ */
342
875
  function Lower(text: string): string;
876
+ /**
877
+ * 文本拼接
878
+ *
879
+ * @remarks
880
+ * 返回多个文本拼接后的新文本
881
+ *
882
+ * @privateForWeDa
883
+ * {"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,...]):文本"}
884
+ */
343
885
  function Concat(...text: string[]): string;
344
886
 
887
+ /**
888
+ * 获取现在时间
889
+ *
890
+ * @remarks
891
+ * 返回当前系统时间,通常与其他日期时间函数搭配使用
892
+ *
893
+ * @privateForWeDa
894
+ * {"group": "formula", "displayType": "function", "displayName": "获取现在时间", "insertText": "Now()", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回当前系统时间,通常与其他日期时间函数搭配使用" , "definition": "Now():日期时间"}
895
+ */
345
896
  function Now(): number;
897
+ /**
898
+ * 获取时间戳
899
+ *
900
+ * @remarks
901
+ * 根据输入的日期时间返回时间戳
902
+ *
903
+ * @privateForWeDa
904
+ * {"group": "formula", "displayType": "function", "displayName": "获取时间戳", "insertText": "Timestamp(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回时间戳" , "definition": "Timestamp(日期时间):日期时间"}
905
+ */
346
906
  function Timestamp(arg: number | string | Date): number;
907
+ /**
908
+ * 获取秒数
909
+ *
910
+ * @remarks
911
+ * 根据输入的日期时间返回该时间的秒数
912
+ *
913
+ * @privateForWeDa
914
+ * {"group": "formula", "displayType": "function", "displayName": "获取秒数", "insertText": "Second(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的秒数" , "definition": "Second(日期时间):数字"}
915
+ */
347
916
  function Second(arg: number | string | Date): number;
917
+ /**
918
+ * 获取分钟数
919
+ *
920
+ * @remarks
921
+ * 根据输入的日期时间返回该时间的分钟部分
922
+ *
923
+ * @privateForWeDa
924
+ * {"group": "formula", "displayType": "function", "displayName": "获取分钟数", "insertText": "Minute(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的分钟部分" , "definition": "Minute(日期时间):数字"}
925
+ */
348
926
  function Minute(arg: number | string | Date): number;
927
+ /**
928
+ * 获取小时数
929
+ *
930
+ * @remarks
931
+ * 根据输入的日期时间返回该时间的小时部分,24小时制
932
+ *
933
+ * @privateForWeDa
934
+ * {"group": "formula", "displayType": "function", "displayName": "获取小时数", "insertText": "Hour(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的小时部分,24小时制" , "definition": "Hour(日期时间):数字"}
935
+ */
349
936
  function Hour(arg: number | string | Date): number;
937
+ /**
938
+ * 获取天数
939
+ *
940
+ * @remarks
941
+ * 根据输入的日期时间返回该时间的日部分,范围为 1-31
942
+ *
943
+ * @privateForWeDa
944
+ * {"group": "formula", "displayType": "function", "displayName": "获取天数", "insertText": "Day(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的日部分,范围为 1-31" , "definition": "Day(日期时间):数字"}
945
+ */
350
946
  function Day(arg: number | string | Date): number;
947
+ /**
948
+ * 获取星期数
949
+ *
950
+ * @remarks
951
+ * 根据输入的日期时间返回该时间的星期数
952
+ *
953
+ * @privateForWeDa
954
+ * {"group": "formula", "displayType": "function", "displayName": "获取星期数", "insertText": "DayOfWeek(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的星期数" , "definition": "DayOfWeek(日期时间):数字"}
955
+ */
351
956
  function DayOfWeek(arg: number | string | Date): number;
957
+ /**
958
+ * 获取月数
959
+ *
960
+ * @remarks
961
+ * 根据输入的日期时间返回该时间的月份
962
+ *
963
+ * @privateForWeDa
964
+ * {"group": "formula", "displayType": "function", "displayName": "获取月数", "insertText": "Month(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的月份" , "definition": "Month(日期时间):数字"}
965
+ */
352
966
  function Month(arg: number | string | Date): number;
967
+ /**
968
+ * 获取年份
969
+ *
970
+ * @remarks
971
+ * 根据输入的日期时间返回该时间的年份
972
+ *
973
+ * @privateForWeDa
974
+ * {"group": "formula", "displayType": "function", "displayName": "获取年份", "insertText": "Year(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的年份" , "definition": "Year(日期时间):数字"}
975
+ */
353
976
  function Year(arg: number | string | Date): number;
977
+ /**
978
+ * 使用年月日创建日期时间
979
+ *
980
+ * @remarks
981
+ * 根据输入的年月日数值返回一个日期类型的数据,例如 GetDate(2017,3,24)
982
+ *
983
+ * @privateForWeDa
984
+ * {"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(数字,数字,数字):日期时间"}
985
+ */
354
986
  function GetDate(year: number, month: number, day: number): number;
987
+ /**
988
+ * 使用时间日期文本创建日期时间
989
+ *
990
+ * @remarks
991
+ * 将日期时间文本根据指定格式转化为日期时间,例如 DateTimeValue("2021-12-11 01:19:12", "yyyy-MM-dd HH:mm:ss")
992
+ *
993
+ * @privateForWeDa
994
+ * {"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(文本, 文本):日期时间"}
995
+ */
355
996
  function DateTimeValue(arg: string, val: string): number;
997
+ /**
998
+ * 计算年龄
999
+ *
1000
+ * @remarks
1001
+ * 根据输入的两个日期时间计算出年龄,例如 Age(Date(2017,3,24), Date(2021,3,24))
1002
+ *
1003
+ * @privateForWeDa
1004
+ * {"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(日期时间,日期时间):数字"}
1005
+ */
356
1006
  function Age(arg: number | string | Date, val: number | string | Date): number;
1007
+ /**
1008
+ * 计算当前年龄
1009
+ *
1010
+ * @remarks
1011
+ * 计算当前年龄,例如 AgeOfNow(Date(2017,3,24))
1012
+ *
1013
+ * @privateForWeDa
1014
+ * {"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(日期时间):数字"}
1015
+ */
357
1016
  function AgeOfNow(arg: number | string | Date): number;
1017
+ /**
1018
+ * 增加 X 天
1019
+ *
1020
+ * @remarks
1021
+ * 在传入的日期时间上增加 X 天,支持负数
1022
+ *
1023
+ * @privateForWeDa
1024
+ * {"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(日期时间, 数字):日期时间"}
1025
+ */
358
1026
  function DateAdd(arg: number | string | Date, day: number): number;
1027
+ /**
1028
+ * 增加 X 月
1029
+ *
1030
+ * @remarks
1031
+ * 在传入的日期和时间上增加 X 月,支持负数
1032
+ *
1033
+ * @privateForWeDa
1034
+ * {"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(日期时间, 数字):日期时间"}
1035
+ */
359
1036
  function MonthAdd(arg: number | string | Date, month: number): number;
1037
+ /**
1038
+ * 增加 X 年
1039
+ *
1040
+ * @remarks
1041
+ * 在传入的日期和时间上增加 X 年,支持负数
1042
+ *
1043
+ * @privateForWeDa
1044
+ * {"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(日期时间, 数字):日期时间"}
1045
+ */
360
1046
  function YearAdd(arg: number | string | Date, year: number): number;
1047
+ /**
1048
+ * 天数差
1049
+ *
1050
+ * @remarks
1051
+ * 返回两个日期时间字段之间的天数差,如果为同一天,差数为零
1052
+ *
1053
+ * @privateForWeDa
1054
+ * {"group": "formula", "displayType": "function", "displayName": "天数差", "insertText": "DateDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的天数差,如果为同一天,差数为零" , "definition": "DateDiff(日期时间, 日期时间):数字"}
1055
+ */
361
1056
  function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;
1057
+ /**
1058
+ * 小时差
1059
+ *
1060
+ * @remarks
1061
+ * 返回两个日期时间字段之间的小时差,如果为同一小时,差数为零
1062
+ *
1063
+ * @privateForWeDa
1064
+ * {"group": "formula", "displayType": "function", "displayName": "小时差", "insertText": "HourDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的小时差,如果为同一小时,差数为零" , "definition": "HourDiff(日期时间, 日期时间):数字"}
1065
+ */
362
1066
  function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;
1067
+ /**
1068
+ * 分钟差
1069
+ *
1070
+ * @remarks
1071
+ * 返回两个日期时间字段之间的分钟差,如果为同一分钟,差数为零
1072
+ *
1073
+ * @privateForWeDa
1074
+ * {"group": "formula", "displayType": "function", "displayName": "分钟差", "insertText": "MinuteDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的分钟差,如果为同一分钟,差数为零" , "definition": "MinuteDiff(日期时间, 日期时间):数字"}
1075
+ */
363
1076
  function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;
1077
+ /**
1078
+ * 秒数差
1079
+ *
1080
+ * @remarks
1081
+ * 返回两个日期时间字段之间的天数差,如果为同一天,差数为零
1082
+ *
1083
+ * @privateForWeDa
1084
+ * {"group": "formula", "displayType": "function", "displayName": "秒数差", "insertText": "SecondDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的天数差,如果为同一天,差数为零" , "definition": "SecondDiff(日期时间, 日期时间):数字"}
1085
+ */
364
1086
  function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;
1087
+ /**
1088
+ * 月数差
1089
+ *
1090
+ * @remarks
1091
+ * 返回两个日期时间字段之间的月数差,如果为同一月,差数为零
1092
+ *
1093
+ * @privateForWeDa
1094
+ * {"group": "formula", "displayType": "function", "displayName": "月数差", "insertText": "MonthDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的月数差,如果为同一月,差数为零" , "definition": "MonthDiff(日期时间, 日期时间):数字"}
1095
+ */
365
1096
  function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;
1097
+ /**
1098
+ * 年数差
1099
+ *
1100
+ * @remarks
1101
+ * 返回两个日期时间字段之间的年数差,如果为同一年,差数为零
1102
+ *
1103
+ * @privateForWeDa
1104
+ * {"group": "formula", "displayType": "function", "displayName": "年数差", "insertText": "YearDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的年数差,如果为同一年,差数为零" , "definition": "YearDiff(日期时间, 日期时间):数字"}
1105
+ */
366
1106
  function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;
1107
+ /**
1108
+ * 日期时间格式化
1109
+ *
1110
+ * @remarks
1111
+ * 格式化日期时间为指定格式的文本,例如 DateText(Date(2017,3,24), "yyyy-MM-dd HH:mm:ss")
1112
+ *
1113
+ * @privateForWeDa
1114
+ * {"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(日期时间, 文本):文本"}
1115
+ */
367
1116
  function DateText(createdTime: number | string | Date, text: string): string;
1117
+ /**
1118
+ * 是否为今天
1119
+ *
1120
+ * @remarks
1121
+ * 判断传入的日期时间是否为今天,例如 IsToday(Date(2022,4,8))
1122
+ *
1123
+ * @privateForWeDa
1124
+ * {"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(日期时间):布尔值"}
1125
+ */
368
1126
  function IsToday(date: number | string | Date): boolean;
369
1127
 
370
1128
 
@@ -388,28 +1146,62 @@ declare const forItems = $for;
388
1146
 
389
1147
  // $page Begin
390
1148
  declare namespace $page {
391
- const id: string;
1149
+ /**
1150
+ * 页面 ID
1151
+ *
1152
+ * @privateForWeDa
1153
+ * {"group": "sysVar", "displayType": "string", "displayName": "页面 ID"}
1154
+ */
1155
+ const id: string;
1156
+ /**
1157
+ * 页面名称
1158
+ *
1159
+ * @privateForWeDa
1160
+ * {"group": "sysVar", "displayType": "string", "displayName": "页面名称"}
1161
+ */
392
1162
  const label: string;
1163
+ /**
1164
+ * 页面路径
1165
+ *
1166
+ * @privateForWeDa
1167
+ * {"group": "sysVar", "displayType": "string", "displayName": "页面路径"}
1168
+ */
393
1169
  const path: string;
394
1170
 
1171
+ /**
1172
+ * 页面数据对象
1173
+ */
395
1174
  namespace dataset {
1175
+ /**
1176
+ * 页面变量
1177
+ */
396
1178
  const state: {
397
1179
  // Page State Inner Begin
398
1180
  // Page State 页面变量 - Don't touch me
399
1181
  // Page State Inner End
400
1182
  };
1183
+ /**
1184
+ * 页面参数
1185
+ */
401
1186
  const params: {
402
1187
  // Page Param Inner Begin
403
1188
  // Page Param 页面参数 - Don't touch me
404
1189
  // Page Param Inner End
405
1190
  };
406
1191
  }
1192
+
1193
+ /**
1194
+ * 页面定义 handler 方法
1195
+ */
407
1196
  namespace handler {
408
1197
  // Page Handler Inner Begin
409
1198
  // Page Handler 页面方法 - Don't touch me
410
1199
  // Page Handler Inner End
411
1200
  }
412
1201
 
1202
+ /**
1203
+ * 设置页面变量
1204
+ */
413
1205
  function setState(userSetState: Record<string, any>): void;
414
1206
 
415
1207
  }
@@ -449,14 +1241,95 @@ declare namespace $comp {
449
1241
 
450
1242
  // Global Formula Begin
451
1243
 
1244
+ /**
1245
+ * 绝对值
1246
+ *
1247
+ * @remarks
1248
+ * 计算传入数字的绝对值
1249
+ *
1250
+ * @privateForWeDa
1251
+ * {"group": "formula", "displayType": "function", "displayName": "绝对值", "insertText": "ABS(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "计算传入数字的绝对值" , "definition": "ABS(数字):数字"}
1252
+ */
452
1253
  declare function ABS(num: number): number;
1254
+ /**
1255
+ * 最小值
1256
+ *
1257
+ * @remarks
1258
+ * 返回一组数字中的最小值
1259
+ *
1260
+ * @privateForWeDa
1261
+ * {"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, ...]):数字"}
1262
+ */
453
1263
  declare function Min(...args: number[]): number;
1264
+ /**
1265
+ * 最大值
1266
+ *
1267
+ * @remarks
1268
+ * 返回一组数字中的最大值
1269
+ *
1270
+ * @privateForWeDa
1271
+ * {"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, ...]):数字"}
1272
+ */
454
1273
  declare function Max(...args: number[]): number;
1274
+ /**
1275
+ * 平均值
1276
+ *
1277
+ * @remarks
1278
+ * 返回一组数字中的平均值
1279
+ *
1280
+ * @privateForWeDa
1281
+ * {"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, ...]):数字"}
1282
+ */
455
1283
  declare function Average(...args: number[]): number;
1284
+ /**
1285
+ * 向下取整
1286
+ *
1287
+ * @remarks
1288
+ * 返回传入数字向下取整的结果
1289
+ *
1290
+ * @privateForWeDa
1291
+ * {"group": "formula", "displayType": "function", "displayName": "向下取整", "insertText": "Floor(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回传入数字向下取整的结果" , "definition": "Floor(数字):数字"}
1292
+ */
456
1293
  declare function Floor(num: number): number;
1294
+ /**
1295
+ * 向上取整
1296
+ *
1297
+ * @remarks
1298
+ * 返回传入数字向上取整的结果
1299
+ *
1300
+ * @privateForWeDa
1301
+ * {"group": "formula", "displayType": "function", "displayName": "向上取整", "insertText": "Ceiling(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回传入数字向上取整的结果" , "definition": "Ceiling(数字):数字"}
1302
+ */
457
1303
  declare function Ceiling(num: number): number;
1304
+ /**
1305
+ * 四舍五入
1306
+ *
1307
+ * @remarks
1308
+ * 返回传入数字四舍五入后的结果
1309
+ *
1310
+ * @privateForWeDa
1311
+ * {"group": "formula", "displayType": "function", "displayName": "四舍五入", "insertText": "Round(1)", "subGroup": "calculation", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回传入数字四舍五入后的结果" , "definition": "Round(数字):数字"}
1312
+ */
458
1313
  declare function Round(num: number): number;
1314
+ /**
1315
+ * 求和
1316
+ *
1317
+ * @remarks
1318
+ * 返回一组数字中的和
1319
+ *
1320
+ * @privateForWeDa
1321
+ * {"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, ...]):数字"}
1322
+ */
459
1323
  declare function Sum(...args: number[]): number;
1324
+ /**
1325
+ * 随机数
1326
+ *
1327
+ * @remarks
1328
+ * 返回一个指定范围的伪随机数,例如 Rand(10),返回一个范围在 10 以内的随机数
1329
+ *
1330
+ * @privateForWeDa
1331
+ * {"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(数字):数字"}
1332
+ */
460
1333
  declare function Rand(num: number): number;
461
1334
 
462
1335
  declare interface IIfObjectParam {
@@ -464,49 +1337,368 @@ condition: boolean;
464
1337
  consequent?: any;
465
1338
  alternate?: any;
466
1339
  }
467
- declare interface IIfObjectParam {
468
- condition: boolean;
469
- consequent?: any;
470
- alternate?: any;
471
- }
1340
+ /**
1341
+ * 条件分支
1342
+ *
1343
+ * @remarks
1344
+ * 按判断条件进行逻辑比较,满足时返回一个值,不满足时返回另一个值。
1345
+ *
1346
+ * @privateForWeDa
1347
+ * {"group": "formula", "displayType": "function", "displayName": "条件分支", "insertText": "If(true, '您好', 'hello')", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "按判断条件进行逻辑比较,满足时返回一个值,不满足时返回另一个值。" , "definition": "If(判断条件, 满足时返回的值, 不满足时返回的值):任何类型"}
1348
+ */
472
1349
  declare function If(params: IIfObjectParam): any;
473
1350
  declare function If(condition: boolean, consequent?: any, alternate?: any): any;
1351
+ /**
1352
+ * 是否为空
1353
+ *
1354
+ * @remarks
1355
+ * 判断传入的文本是否为空
1356
+ *
1357
+ * @privateForWeDa
1358
+ * {"group": "formula", "displayType": "function", "displayName": "是否为空", "insertText": "IsEmpty('hello')", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "判断传入的文本是否为空" , "definition": "IsEmpty(值):布尔值"}
1359
+ */
474
1360
  declare function IsEmpty(text: string | string[]): boolean;
1361
+ /**
1362
+ * 是否为null
1363
+ *
1364
+ * @remarks
1365
+ * 判断传入的字段值是否包含数据,即不为 NULL
1366
+ *
1367
+ * @privateForWeDa
1368
+ * {"group": "formula", "displayType": "function", "displayName": "是否为null", "insertText": "NotNull(null)", "subGroup": "logic", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "判断传入的字段值是否包含数据,即不为 NULL" , "definition": "NotNull(字段):布尔值"}
1369
+ */
475
1370
  declare function NotNull(val: any): boolean;
1371
+ /**
1372
+ * 与
1373
+ *
1374
+ * @remarks
1375
+ * 用于确定所有判断条件是否为真
1376
+ *
1377
+ * @privateForWeDa
1378
+ * {"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,...]):布尔值"}
1379
+ */
476
1380
  declare function And(...args: boolean[]): boolean;
1381
+ /**
1382
+ * 或
1383
+ *
1384
+ * @remarks
1385
+ * 任意一个判断条件为真,则结果为真;所有条件为否,结果才为否
1386
+ *
1387
+ * @privateForWeDa
1388
+ * {"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,...]):布尔值"}
1389
+ */
477
1390
  declare function Or(...args: boolean[]): boolean;
478
1391
 
1392
+ /**
1393
+ * 获取文本长度
1394
+ *
1395
+ * @remarks
1396
+ * 获取传入文本的字符数
1397
+ *
1398
+ * @privateForWeDa
1399
+ * {"group": "formula", "displayType": "function", "displayName": "获取文本长度", "insertText": "Len('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "获取传入文本的字符数" , "definition": "Len(文本):数字"}
1400
+ */
479
1401
  declare function Len(text: string): number;
1402
+ /**
1403
+ * 是否包含指定文本
1404
+ *
1405
+ * @remarks
1406
+ * 判断文本 1 是否包含文本 2
1407
+ *
1408
+ * @privateForWeDa
1409
+ * {"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):布尔值"}
1410
+ */
480
1411
  declare function Contains(text1: string, text2: string): boolean;
1412
+ /**
1413
+ * 拆分文本
1414
+ *
1415
+ * @remarks
1416
+ * 根据传入的文本 2,将文本 1 拆分成文本数组,例如 Split("张三,李四,王五", ",")
1417
+ *
1418
+ * @privateForWeDa
1419
+ * {"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):文本数组"}
1420
+ */
481
1421
  declare function Split(text1: string, text2: string): string[];
1422
+ /**
1423
+ * 删除开头/结尾空格和制表符
1424
+ *
1425
+ * @remarks
1426
+ * 删除文本开头和结尾的所有空格和制表符,文本中间的空格和制表符不会删除
1427
+ *
1428
+ * @privateForWeDa
1429
+ * {"group": "formula", "displayType": "function", "displayName": "删除开头/结尾空格和制表符", "insertText": "Trim('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "删除文本开头和结尾的所有空格和制表符,文本中间的空格和制表符不会删除" , "definition": "Trim(文本):文本"}
1430
+ */
482
1431
  declare function Trim(text: string): string;
1432
+ /**
1433
+ * 转换为大写
1434
+ *
1435
+ * @remarks
1436
+ * 将传入的文本转为全大写文本
1437
+ *
1438
+ * @privateForWeDa
1439
+ * {"group": "formula", "displayType": "function", "displayName": "转换为大写", "insertText": "Upper('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "将传入的文本转为全大写文本" , "definition": "Upper(文本):文本"}
1440
+ */
483
1441
  declare function Upper(text: string): string;
1442
+ /**
1443
+ * 转换为小写
1444
+ *
1445
+ * @remarks
1446
+ * 将传入的文本转为全小写文本
1447
+ *
1448
+ * @privateForWeDa
1449
+ * {"group": "formula", "displayType": "function", "displayName": "转换为小写", "insertText": "Lower('文本')", "subGroup": "text", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "将传入的文本转为全小写文本" , "definition": "Lower(文本):文本"}
1450
+ */
484
1451
  declare function Lower(text: string): string;
1452
+ /**
1453
+ * 文本拼接
1454
+ *
1455
+ * @remarks
1456
+ * 返回多个文本拼接后的新文本
1457
+ *
1458
+ * @privateForWeDa
1459
+ * {"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,...]):文本"}
1460
+ */
485
1461
  declare function Concat(...text: string[]): string;
486
1462
 
1463
+ /**
1464
+ * 获取现在时间
1465
+ *
1466
+ * @remarks
1467
+ * 返回当前系统时间,通常与其他日期时间函数搭配使用
1468
+ *
1469
+ * @privateForWeDa
1470
+ * {"group": "formula", "displayType": "function", "displayName": "获取现在时间", "insertText": "Now()", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回当前系统时间,通常与其他日期时间函数搭配使用" , "definition": "Now():日期时间"}
1471
+ */
487
1472
  declare function Now(): number;
1473
+ /**
1474
+ * 获取时间戳
1475
+ *
1476
+ * @remarks
1477
+ * 根据输入的日期时间返回时间戳
1478
+ *
1479
+ * @privateForWeDa
1480
+ * {"group": "formula", "displayType": "function", "displayName": "获取时间戳", "insertText": "Timestamp(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回时间戳" , "definition": "Timestamp(日期时间):日期时间"}
1481
+ */
488
1482
  declare function Timestamp(arg: number | string | Date): number;
1483
+ /**
1484
+ * 获取秒数
1485
+ *
1486
+ * @remarks
1487
+ * 根据输入的日期时间返回该时间的秒数
1488
+ *
1489
+ * @privateForWeDa
1490
+ * {"group": "formula", "displayType": "function", "displayName": "获取秒数", "insertText": "Second(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的秒数" , "definition": "Second(日期时间):数字"}
1491
+ */
489
1492
  declare function Second(arg: number | string | Date): number;
1493
+ /**
1494
+ * 获取分钟数
1495
+ *
1496
+ * @remarks
1497
+ * 根据输入的日期时间返回该时间的分钟部分
1498
+ *
1499
+ * @privateForWeDa
1500
+ * {"group": "formula", "displayType": "function", "displayName": "获取分钟数", "insertText": "Minute(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的分钟部分" , "definition": "Minute(日期时间):数字"}
1501
+ */
490
1502
  declare function Minute(arg: number | string | Date): number;
1503
+ /**
1504
+ * 获取小时数
1505
+ *
1506
+ * @remarks
1507
+ * 根据输入的日期时间返回该时间的小时部分,24小时制
1508
+ *
1509
+ * @privateForWeDa
1510
+ * {"group": "formula", "displayType": "function", "displayName": "获取小时数", "insertText": "Hour(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的小时部分,24小时制" , "definition": "Hour(日期时间):数字"}
1511
+ */
491
1512
  declare function Hour(arg: number | string | Date): number;
1513
+ /**
1514
+ * 获取天数
1515
+ *
1516
+ * @remarks
1517
+ * 根据输入的日期时间返回该时间的日部分,范围为 1-31
1518
+ *
1519
+ * @privateForWeDa
1520
+ * {"group": "formula", "displayType": "function", "displayName": "获取天数", "insertText": "Day(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的日部分,范围为 1-31" , "definition": "Day(日期时间):数字"}
1521
+ */
492
1522
  declare function Day(arg: number | string | Date): number;
1523
+ /**
1524
+ * 获取星期数
1525
+ *
1526
+ * @remarks
1527
+ * 根据输入的日期时间返回该时间的星期数
1528
+ *
1529
+ * @privateForWeDa
1530
+ * {"group": "formula", "displayType": "function", "displayName": "获取星期数", "insertText": "DayOfWeek(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的星期数" , "definition": "DayOfWeek(日期时间):数字"}
1531
+ */
493
1532
  declare function DayOfWeek(arg: number | string | Date): number;
1533
+ /**
1534
+ * 获取月数
1535
+ *
1536
+ * @remarks
1537
+ * 根据输入的日期时间返回该时间的月份
1538
+ *
1539
+ * @privateForWeDa
1540
+ * {"group": "formula", "displayType": "function", "displayName": "获取月数", "insertText": "Month(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的月份" , "definition": "Month(日期时间):数字"}
1541
+ */
494
1542
  declare function Month(arg: number | string | Date): number;
1543
+ /**
1544
+ * 获取年份
1545
+ *
1546
+ * @remarks
1547
+ * 根据输入的日期时间返回该时间的年份
1548
+ *
1549
+ * @privateForWeDa
1550
+ * {"group": "formula", "displayType": "function", "displayName": "获取年份", "insertText": "Year(1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "根据输入的日期时间返回该时间的年份" , "definition": "Year(日期时间):数字"}
1551
+ */
495
1552
  declare function Year(arg: number | string | Date): number;
1553
+ /**
1554
+ * 使用年月日创建日期时间
1555
+ *
1556
+ * @remarks
1557
+ * 根据输入的年月日数值返回一个日期类型的数据,例如 GetDate(2017,3,24)
1558
+ *
1559
+ * @privateForWeDa
1560
+ * {"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(数字,数字,数字):日期时间"}
1561
+ */
496
1562
  declare function GetDate(year: number, month: number, day: number): number;
1563
+ /**
1564
+ * 使用时间日期文本创建日期时间
1565
+ *
1566
+ * @remarks
1567
+ * 将日期时间文本根据指定格式转化为日期时间,例如 DateTimeValue("2021-12-11 01:19:12", "yyyy-MM-dd HH:mm:ss")
1568
+ *
1569
+ * @privateForWeDa
1570
+ * {"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(文本, 文本):日期时间"}
1571
+ */
497
1572
  declare function DateTimeValue(arg: string, val: string): number;
1573
+ /**
1574
+ * 计算年龄
1575
+ *
1576
+ * @remarks
1577
+ * 根据输入的两个日期时间计算出年龄,例如 Age(Date(2017,3,24), Date(2021,3,24))
1578
+ *
1579
+ * @privateForWeDa
1580
+ * {"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(日期时间,日期时间):数字"}
1581
+ */
498
1582
  declare function Age(arg: number | string | Date, val: number | string | Date): number;
1583
+ /**
1584
+ * 计算当前年龄
1585
+ *
1586
+ * @remarks
1587
+ * 计算当前年龄,例如 AgeOfNow(Date(2017,3,24))
1588
+ *
1589
+ * @privateForWeDa
1590
+ * {"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(日期时间):数字"}
1591
+ */
499
1592
  declare function AgeOfNow(arg: number | string | Date): number;
1593
+ /**
1594
+ * 增加 X 天
1595
+ *
1596
+ * @remarks
1597
+ * 在传入的日期时间上增加 X 天,支持负数
1598
+ *
1599
+ * @privateForWeDa
1600
+ * {"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(日期时间, 数字):日期时间"}
1601
+ */
500
1602
  declare function DateAdd(arg: number | string | Date, day: number): number;
1603
+ /**
1604
+ * 增加 X 月
1605
+ *
1606
+ * @remarks
1607
+ * 在传入的日期和时间上增加 X 月,支持负数
1608
+ *
1609
+ * @privateForWeDa
1610
+ * {"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(日期时间, 数字):日期时间"}
1611
+ */
501
1612
  declare function MonthAdd(arg: number | string | Date, month: number): number;
1613
+ /**
1614
+ * 增加 X 年
1615
+ *
1616
+ * @remarks
1617
+ * 在传入的日期和时间上增加 X 年,支持负数
1618
+ *
1619
+ * @privateForWeDa
1620
+ * {"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(日期时间, 数字):日期时间"}
1621
+ */
502
1622
  declare function YearAdd(arg: number | string | Date, year: number): number;
1623
+ /**
1624
+ * 天数差
1625
+ *
1626
+ * @remarks
1627
+ * 返回两个日期时间字段之间的天数差,如果为同一天,差数为零
1628
+ *
1629
+ * @privateForWeDa
1630
+ * {"group": "formula", "displayType": "function", "displayName": "天数差", "insertText": "DateDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的天数差,如果为同一天,差数为零" , "definition": "DateDiff(日期时间, 日期时间):数字"}
1631
+ */
503
1632
  declare function DateDiff(startDay: number | string | Date, endDay: number | string | Date): number;
1633
+ /**
1634
+ * 小时差
1635
+ *
1636
+ * @remarks
1637
+ * 返回两个日期时间字段之间的小时差,如果为同一小时,差数为零
1638
+ *
1639
+ * @privateForWeDa
1640
+ * {"group": "formula", "displayType": "function", "displayName": "小时差", "insertText": "HourDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的小时差,如果为同一小时,差数为零" , "definition": "HourDiff(日期时间, 日期时间):数字"}
1641
+ */
504
1642
  declare function HourDiff(startDay: number | string | Date, endDay: number | string | Date): number;
1643
+ /**
1644
+ * 分钟差
1645
+ *
1646
+ * @remarks
1647
+ * 返回两个日期时间字段之间的分钟差,如果为同一分钟,差数为零
1648
+ *
1649
+ * @privateForWeDa
1650
+ * {"group": "formula", "displayType": "function", "displayName": "分钟差", "insertText": "MinuteDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的分钟差,如果为同一分钟,差数为零" , "definition": "MinuteDiff(日期时间, 日期时间):数字"}
1651
+ */
505
1652
  declare function MinuteDiff(startDay: number | string | Date, endDay: number | string | Date): number;
1653
+ /**
1654
+ * 秒数差
1655
+ *
1656
+ * @remarks
1657
+ * 返回两个日期时间字段之间的天数差,如果为同一天,差数为零
1658
+ *
1659
+ * @privateForWeDa
1660
+ * {"group": "formula", "displayType": "function", "displayName": "秒数差", "insertText": "SecondDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的天数差,如果为同一天,差数为零" , "definition": "SecondDiff(日期时间, 日期时间):数字"}
1661
+ */
506
1662
  declare function SecondDiff(startDay: number | string | Date, endDay: number | string | Date): number;
1663
+ /**
1664
+ * 月数差
1665
+ *
1666
+ * @remarks
1667
+ * 返回两个日期时间字段之间的月数差,如果为同一月,差数为零
1668
+ *
1669
+ * @privateForWeDa
1670
+ * {"group": "formula", "displayType": "function", "displayName": "月数差", "insertText": "MonthDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的月数差,如果为同一月,差数为零" , "definition": "MonthDiff(日期时间, 日期时间):数字"}
1671
+ */
507
1672
  declare function MonthDiff(startDay: number | string | Date, endDay: number | string | Date): number;
1673
+ /**
1674
+ * 年数差
1675
+ *
1676
+ * @remarks
1677
+ * 返回两个日期时间字段之间的年数差,如果为同一年,差数为零
1678
+ *
1679
+ * @privateForWeDa
1680
+ * {"group": "formula", "displayType": "function", "displayName": "年数差", "insertText": "YearDiff(1661334203345, 1661334203345)", "subGroup": "time", "doc": "https://cloud.tencent.com/document/product/1301/76328" , "description": "返回两个日期时间字段之间的年数差,如果为同一年,差数为零" , "definition": "YearDiff(日期时间, 日期时间):数字"}
1681
+ */
508
1682
  declare function YearDiff(startDay: number | string | Date, endDay: number | string | Date): number;
1683
+ /**
1684
+ * 日期时间格式化
1685
+ *
1686
+ * @remarks
1687
+ * 格式化日期时间为指定格式的文本,例如 DateText(Date(2017,3,24), "yyyy-MM-dd HH:mm:ss")
1688
+ *
1689
+ * @privateForWeDa
1690
+ * {"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(日期时间, 文本):文本"}
1691
+ */
509
1692
  declare function DateText(createdTime: number | string | Date, text: string): string;
1693
+ /**
1694
+ * 是否为今天
1695
+ *
1696
+ * @remarks
1697
+ * 判断传入的日期时间是否为今天,例如 IsToday(Date(2022,4,8))
1698
+ *
1699
+ * @privateForWeDa
1700
+ * {"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(日期时间):布尔值"}
1701
+ */
510
1702
  declare function IsToday(date: number | string | Date): boolean;
511
1703
 
512
1704