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