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