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