@cloudbase/cals 1.0.2 → 1.0.3-alpha.1

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