@dcloudio/uni-app-x 0.7.10 → 0.7.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/.prettierrc +5 -0
  2. package/package.json +2 -2
  3. package/types/native/IUniElement.d.ts +30 -47
  4. package/types/native/UniApp.d.ts +17 -4
  5. package/types/native/UniDocument.d.ts +52 -4
  6. package/types/native/UniNativePage.d.ts +59 -32
  7. package/types/native/UniNestedPreScrollEvent.d.ts +45 -46
  8. package/types/native/UniTabsElement.d.ts +51 -21
  9. package/types/native/UniTextElement.d.ts +18 -1
  10. package/types/uni/global.d.ts +0 -1
  11. package/types/uni/index.d.ts +0 -1
  12. package/types/uni/uts-plugin-api/global.d.ts +12 -0
  13. package/types/uni/uts-plugin-api/index.d.ts +12 -0
  14. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +412 -0
  15. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +36 -6
  16. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +277 -0
  17. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +41 -14
  18. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +17 -17
  19. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +15 -15
  20. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +2 -2
  21. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +73 -0
  22. package/types/uni/{core/lib/lifecycle → uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk}/global.d.ts +2 -0
  23. package/types/uni/{core/lib/lifecycle → uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk}/index.d.ts +1 -0
  24. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +39 -0
  25. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +1 -1
  26. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +157 -0
  27. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +9 -9
  28. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +2 -2
  29. package/types/uni/{core/lib/base/interceptor → uts-plugin-api/lib/uni-interceptor/utssdk}/global.d.ts +0 -2
  30. package/types/uni/{core/lib/base/interceptor → uts-plugin-api/lib/uni-interceptor/utssdk}/index.d.ts +0 -1
  31. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +152 -0
  32. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +557 -0
  33. package/types/uni/{core/lib/ui/set-navigation-bar-color → uts-plugin-api/lib/uni-navigationBar/utssdk}/global.d.ts +20 -4
  34. package/types/uni/{core/lib/ui/set-navigation-bar-title → uts-plugin-api/lib/uni-navigationBar/utssdk}/index.d.ts +10 -2
  35. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +794 -0
  36. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +10 -0
  37. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/index.d.ts +5 -0
  38. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +107 -39
  39. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +20 -20
  40. package/types/uni/uts-plugin-api/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +2 -2
  41. package/types/uni/{core/lib/ui/page-scroll-to → uts-plugin-api/lib/uni-pageScrollTo/utssdk}/global.d.ts +2 -4
  42. package/types/uni/{core/lib/ui/page-scroll-to → uts-plugin-api/lib/uni-pageScrollTo/utssdk}/index.d.ts +1 -2
  43. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +143 -0
  44. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +1 -1
  45. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +45 -45
  46. package/types/uni/{core/lib/ui/pull-down-refresh → uts-plugin-api/lib/uni-pullDownRefresh/utssdk}/global.d.ts +2 -4
  47. package/types/uni/{core/lib/ui/pull-down-refresh → uts-plugin-api/lib/uni-pullDownRefresh/utssdk}/index.d.ts +1 -2
  48. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +174 -0
  49. package/types/uni/{core/lib/route → uts-plugin-api/lib/uni-route/utssdk}/global.d.ts +0 -10
  50. package/types/uni/{core/lib/route → uts-plugin-api/lib/uni-route/utssdk}/index.d.ts +0 -5
  51. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +2020 -0
  52. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +2 -2
  53. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +21 -21
  54. package/types/uni/{core/lib/ui/tab-bar → uts-plugin-api/lib/uni-tabBar/utssdk}/global.d.ts +4 -2
  55. package/types/uni/{core/lib/ui/tab-bar → uts-plugin-api/lib/uni-tabBar/utssdk}/index.d.ts +2 -1
  56. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +926 -0
  57. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +26 -26
  58. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +59 -9
  59. package/types/uni/core/global.d.ts +0 -13
  60. package/types/uni/core/index.d.ts +0 -13
  61. package/types/uni/core/lib/base/event/interface.d.ts +0 -277
  62. package/types/uni/core/lib/base/interceptor/interface.d.ts +0 -150
  63. package/types/uni/core/lib/interface.d.ts +0 -28
  64. package/types/uni/core/lib/lifecycle/interface.d.ts +0 -37
  65. package/types/uni/core/lib/performance/interface.d.ts +0 -157
  66. package/types/uni/core/lib/route/interface.d.ts +0 -2031
  67. package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +0 -412
  68. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +0 -73
  69. package/types/uni/core/lib/ui/load-font-face/interface.d.ts +0 -560
  70. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +0 -145
  71. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +0 -176
  72. package/types/uni/core/lib/ui/set-navigation-bar-color/index.d.ts +0 -13
  73. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +0 -431
  74. package/types/uni/core/lib/ui/set-navigation-bar-title/global.d.ts +0 -28
  75. package/types/uni/core/lib/ui/set-navigation-bar-title/interface.d.ts +0 -368
  76. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +0 -928
  77. package/types/uni/{core/lib/ui/create-selector-query → uts-plugin-api/lib/uni-createSelectorQuery/utssdk}/global.d.ts +0 -0
  78. package/types/uni/{core/lib/ui/create-selector-query → uts-plugin-api/lib/uni-createSelectorQuery/utssdk}/index.d.ts +0 -0
  79. package/types/uni/{core/lib/base/event → uts-plugin-api/lib/uni-event/utssdk}/global.d.ts +0 -0
  80. package/types/uni/{core/lib/base/event → uts-plugin-api/lib/uni-event/utssdk}/index.d.ts +0 -0
  81. package/types/uni/{core/lib/ui/get-element-by-id → uts-plugin-api/lib/uni-getElementById/utssdk}/global.d.ts +0 -0
  82. package/types/uni/{core/lib/ui/get-element-by-id → uts-plugin-api/lib/uni-getElementById/utssdk}/index.d.ts +0 -0
  83. package/types/uni/{core/lib/performance → uts-plugin-api/lib/uni-getPerformance/utssdk}/global.d.ts +0 -0
  84. package/types/uni/{core/lib/performance → uts-plugin-api/lib/uni-getPerformance/utssdk}/index.d.ts +0 -0
  85. package/types/uni/{core/lib/ui/load-font-face → uts-plugin-api/lib/uni-loadFontFace/utssdk}/global.d.ts +2 -2
  86. package/types/uni/{core/lib/ui/load-font-face → uts-plugin-api/lib/uni-loadFontFace/utssdk}/index.d.ts +1 -1
@@ -1,560 +0,0 @@
1
- import { AsyncApiSuccessResult } from '../../interface'
2
-
3
- export type LoadFontFaceOptionDesc = {
4
- style: string | null
5
- weight: string | null
6
- variant: string | null
7
- }
8
- /**
9
- * 错误码
10
- * - 4: 框架内部异常
11
- * - 99: page is not ready
12
- * - 101: 参数错误
13
- * - 100001: family is null
14
- * - 100002: source is null
15
- * - 200001: local font not found
16
- * - 300001: same source task is loading
17
- * - 300002: download fail
18
- */
19
- export type LoadFontFaceErrCode =
20
- | 4
21
- | 99
22
- | 101
23
- | 100001
24
- | 100002
25
- | 200001
26
- | 300001
27
- | 300002
28
- export abstract class LoadFontFaceError extends UniError {
29
- abstract override errCode: LoadFontFaceErrCode
30
- }
31
- export type LoadFontFaceOptions = {
32
- /**
33
- * 是否全局生效。微信小程序 '2.10.0'起支持全局生效,需在 app.vue 中调用。
34
- * @uniPlatform {
35
- * "app": {
36
- * "android": {
37
- * "osVer": "5.0",
38
- * "uniVer": "√",
39
- * "unixVer": "√"
40
- * },
41
- * "ios": {
42
- * "osVer": "10.0",
43
- * "uniVer": "√",
44
- * "unixVer": "x"
45
- * }
46
- * },
47
- * "mp": {
48
- * "weixin": {
49
- * "hostVer": ">=2.10.0",
50
- * "uniVer": "√",
51
- * "unixVer": "x"
52
- * },
53
- * "alipay": {
54
- * "hostVer": "√",
55
- * "uniVer": "√",
56
- * "unixVer": "x"
57
- * },
58
- * "baidu": {
59
- * "hostVer": "√",
60
- * "uniVer": "√",
61
- * "unixVer": "x"
62
- * },
63
- * "toutiao": {
64
- * "hostVer": "√",
65
- * "uniVer": "√",
66
- * "unixVer": "x"
67
- * },
68
- * "lark": {
69
- * "hostVer": "√",
70
- * "uniVer": "√",
71
- * "unixVer": "x"
72
- * },
73
- * "qq": {
74
- * "hostVer": "√",
75
- * "uniVer": "√",
76
- * "unixVer": "x"
77
- * },
78
- * "kuaishou": {
79
- * "hostVer": "√",
80
- * "uniVer": "√",
81
- * "unixVer": "x"
82
- * },
83
- * "jd": {
84
- * "hostVer": "√",
85
- * "uniVer": "√",
86
- * "unixVer": "x"
87
- * }
88
- * },
89
- * "web": {
90
- * "uniVer": "√",
91
- * "unixVer": "4.0"
92
- * }
93
- * }
94
- */
95
- global?: boolean
96
- /**
97
- * 定义的字体名称
98
- * @uniPlatform {
99
- * "app": {
100
- * "android": {
101
- * "osVer": "5.0",
102
- * "uniVer": "√",
103
- * "unixVer": "√"
104
- * },
105
- * "ios": {
106
- * "osVer": "10.0",
107
- * "uniVer": "√",
108
- * "unixVer": "x"
109
- * }
110
- * },
111
- * "mp": {
112
- * "weixin": {
113
- * "hostVer": "√",
114
- * "uniVer": "√",
115
- * "unixVer": "x"
116
- * },
117
- * "alipay": {
118
- * "hostVer": "√",
119
- * "uniVer": "√",
120
- * "unixVer": "x"
121
- * },
122
- * "baidu": {
123
- * "hostVer": "√",
124
- * "uniVer": "√",
125
- * "unixVer": "x"
126
- * },
127
- * "toutiao": {
128
- * "hostVer": "√",
129
- * "uniVer": "√",
130
- * "unixVer": "x"
131
- * },
132
- * "lark": {
133
- * "hostVer": "√",
134
- * "uniVer": "√",
135
- * "unixVer": "x"
136
- * },
137
- * "qq": {
138
- * "hostVer": "√",
139
- * "uniVer": "√",
140
- * "unixVer": "x"
141
- * },
142
- * "kuaishou": {
143
- * "hostVer": "√",
144
- * "uniVer": "√",
145
- * "unixVer": "x"
146
- * },
147
- * "jd": {
148
- * "hostVer": "√",
149
- * "uniVer": "√",
150
- * "unixVer": "x"
151
- * }
152
- * },
153
- * "web": {
154
- * "uniVer": "√",
155
- * "unixVer": "4.0"
156
- * }
157
- * }
158
- */
159
- family: string
160
- /**
161
- * 字体资源的地址, App-Android 平台不支持 woff、woff2 格式字体文件
162
- * @uniPlatform {
163
- * "app": {
164
- * "android": {
165
- * "osVer": "5.0",
166
- * "uniVer": "√",
167
- * "unixVer": "√"
168
- * },
169
- * "ios": {
170
- * "osVer": "10.0",
171
- * "uniVer": "√",
172
- * "unixVer": "x"
173
- * }
174
- * },
175
- * "mp": {
176
- * "weixin": {
177
- * "hostVer": "√",
178
- * "uniVer": "√",
179
- * "unixVer": "x"
180
- * },
181
- * "alipay": {
182
- * "hostVer": "√",
183
- * "uniVer": "√",
184
- * "unixVer": "x"
185
- * },
186
- * "baidu": {
187
- * "hostVer": "√",
188
- * "uniVer": "√",
189
- * "unixVer": "x"
190
- * },
191
- * "toutiao": {
192
- * "hostVer": "√",
193
- * "uniVer": "√",
194
- * "unixVer": "x"
195
- * },
196
- * "lark": {
197
- * "hostVer": "√",
198
- * "uniVer": "√",
199
- * "unixVer": "x"
200
- * },
201
- * "qq": {
202
- * "hostVer": "√",
203
- * "uniVer": "√",
204
- * "unixVer": "x"
205
- * },
206
- * "kuaishou": {
207
- * "hostVer": "√",
208
- * "uniVer": "√",
209
- * "unixVer": "x"
210
- * },
211
- * "jd": {
212
- * "hostVer": "√",
213
- * "uniVer": "√",
214
- * "unixVer": "x"
215
- * }
216
- * },
217
- * "web": {
218
- * "uniVer": "√",
219
- * "unixVer": "4.0"
220
- * }
221
- * }
222
- */
223
- source: string
224
- /**
225
- * 可选的字体描述符
226
- * @uniPlatform {
227
- * "app": {
228
- * "android": {
229
- * "osVer": "5.0",
230
- * "uniVer": "√",
231
- * "unixVer": "x"
232
- * },
233
- * "ios": {
234
- * "osVer": "10.0",
235
- * "uniVer": "√",
236
- * "unixVer": "x"
237
- * }
238
- * },
239
- * "mp": {
240
- * "weixin": {
241
- * "hostVer": "√",
242
- * "uniVer": "√",
243
- * "unixVer": "x"
244
- * },
245
- * "alipay": {
246
- * "hostVer": "√",
247
- * "uniVer": "√",
248
- * "unixVer": "x"
249
- * },
250
- * "baidu": {
251
- * "hostVer": "√",
252
- * "uniVer": "√",
253
- * "unixVer": "x"
254
- * },
255
- * "toutiao": {
256
- * "hostVer": "√",
257
- * "uniVer": "√",
258
- * "unixVer": "x"
259
- * },
260
- * "lark": {
261
- * "hostVer": "√",
262
- * "uniVer": "√",
263
- * "unixVer": "x"
264
- * },
265
- * "qq": {
266
- * "hostVer": "√",
267
- * "uniVer": "√",
268
- * "unixVer": "x"
269
- * },
270
- * "kuaishou": {
271
- * "hostVer": "√",
272
- * "uniVer": "√",
273
- * "unixVer": "x"
274
- * },
275
- * "jd": {
276
- * "hostVer": "√",
277
- * "uniVer": "√",
278
- * "unixVer": "x"
279
- * }
280
- * },
281
- * "web": {
282
- * "uniVer": "√",
283
- * "unixVer": "4.0"
284
- * }
285
- * }
286
- */
287
- desc?: LoadFontFaceOptionDesc
288
- /**
289
- * 接口调用成功的回调函数
290
- * @uniPlatform {
291
- * "app": {
292
- * "android": {
293
- * "osVer": "5.0",
294
- * "uniVer": "√",
295
- * "unixVer": "√"
296
- * },
297
- * "ios": {
298
- * "osVer": "10.0",
299
- * "uniVer": "√",
300
- * "unixVer": "x"
301
- * }
302
- * },
303
- * "mp": {
304
- * "weixin": {
305
- * "hostVer": "√",
306
- * "uniVer": "√",
307
- * "unixVer": "x"
308
- * },
309
- * "alipay": {
310
- * "hostVer": "√",
311
- * "uniVer": "√",
312
- * "unixVer": "x"
313
- * },
314
- * "baidu": {
315
- * "hostVer": "√",
316
- * "uniVer": "√",
317
- * "unixVer": "x"
318
- * },
319
- * "toutiao": {
320
- * "hostVer": "√",
321
- * "uniVer": "√",
322
- * "unixVer": "x"
323
- * },
324
- * "lark": {
325
- * "hostVer": "√",
326
- * "uniVer": "√",
327
- * "unixVer": "x"
328
- * },
329
- * "qq": {
330
- * "hostVer": "√",
331
- * "uniVer": "√",
332
- * "unixVer": "x"
333
- * },
334
- * "kuaishou": {
335
- * "hostVer": "√",
336
- * "uniVer": "√",
337
- * "unixVer": "x"
338
- * },
339
- * "jd": {
340
- * "hostVer": "√",
341
- * "uniVer": "√",
342
- * "unixVer": "x"
343
- * }
344
- * },
345
- * "web": {
346
- * "uniVer": "√",
347
- * "unixVer": "4.0"
348
- * }
349
- * }
350
- */
351
- success?: LoadFontFaceSuccessCallback
352
- /**
353
- * 接口调用失败的回调函数
354
- * @uniPlatform {
355
- * "app": {
356
- * "android": {
357
- * "osVer": "5.0",
358
- * "uniVer": "√",
359
- * "unixVer": "√"
360
- * },
361
- * "ios": {
362
- * "osVer": "10.0",
363
- * "uniVer": "√",
364
- * "unixVer": "x"
365
- * }
366
- * },
367
- * "mp": {
368
- * "weixin": {
369
- * "hostVer": "√",
370
- * "uniVer": "√",
371
- * "unixVer": "x"
372
- * },
373
- * "alipay": {
374
- * "hostVer": "√",
375
- * "uniVer": "√",
376
- * "unixVer": "x"
377
- * },
378
- * "baidu": {
379
- * "hostVer": "√",
380
- * "uniVer": "√",
381
- * "unixVer": "x"
382
- * },
383
- * "toutiao": {
384
- * "hostVer": "√",
385
- * "uniVer": "√",
386
- * "unixVer": "x"
387
- * },
388
- * "lark": {
389
- * "hostVer": "√",
390
- * "uniVer": "√",
391
- * "unixVer": "x"
392
- * },
393
- * "qq": {
394
- * "hostVer": "√",
395
- * "uniVer": "√",
396
- * "unixVer": "x"
397
- * },
398
- * "kuaishou": {
399
- * "hostVer": "√",
400
- * "uniVer": "√",
401
- * "unixVer": "x"
402
- * },
403
- * "jd": {
404
- * "hostVer": "√",
405
- * "uniVer": "√",
406
- * "unixVer": "x"
407
- * }
408
- * },
409
- * "web": {
410
- * "uniVer": "√",
411
- * "unixVer": "4.0"
412
- * }
413
- * }
414
- */
415
- fail?: LoadFontFaceFailCallback
416
- /**
417
- * 接口调用结束的回调函数(调用成功、失败都会执行)
418
- * @uniPlatform {
419
- * "app": {
420
- * "android": {
421
- * "osVer": "5.0",
422
- * "uniVer": "√",
423
- * "unixVer": "√"
424
- * },
425
- * "ios": {
426
- * "osVer": "10.0",
427
- * "uniVer": "√",
428
- * "unixVer": "x"
429
- * }
430
- * },
431
- * "mp": {
432
- * "weixin": {
433
- * "hostVer": "√",
434
- * "uniVer": "√",
435
- * "unixVer": "x"
436
- * },
437
- * "alipay": {
438
- * "hostVer": "√",
439
- * "uniVer": "√",
440
- * "unixVer": "x"
441
- * },
442
- * "baidu": {
443
- * "hostVer": "√",
444
- * "uniVer": "√",
445
- * "unixVer": "x"
446
- * },
447
- * "toutiao": {
448
- * "hostVer": "√",
449
- * "uniVer": "√",
450
- * "unixVer": "x"
451
- * },
452
- * "lark": {
453
- * "hostVer": "√",
454
- * "uniVer": "√",
455
- * "unixVer": "x"
456
- * },
457
- * "qq": {
458
- * "hostVer": "√",
459
- * "uniVer": "√",
460
- * "unixVer": "x"
461
- * },
462
- * "kuaishou": {
463
- * "hostVer": "√",
464
- * "uniVer": "√",
465
- * "unixVer": "x"
466
- * },
467
- * "jd": {
468
- * "hostVer": "√",
469
- * "uniVer": "√",
470
- * "unixVer": "x"
471
- * }
472
- * },
473
- * "web": {
474
- * "uniVer": "√",
475
- * "unixVer": "4.0"
476
- * }
477
- * }
478
- */
479
- complete?: LoadFontFaceCompleteCallback
480
- }
481
-
482
- export type LoadFontFaceSuccess = AsyncApiSuccessResult
483
- export type LoadFontFaceSuccessCallback = (result: LoadFontFaceSuccess) => void
484
-
485
- export type LoadFontFaceFail = LoadFontFaceError
486
- export type LoadFontFaceFailCallback = (error: LoadFontFaceError) => void
487
-
488
- export type LoadFontFaceComplete = AsyncApiResult
489
- export type LoadFontFaceCompleteCallback = (res: LoadFontFaceComplete) => void
490
-
491
- export interface Uni {
492
- /**
493
- * 动态加载网络字体
494
- *
495
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/load-font-face.html
496
- * @uniPlatform {
497
- * "app": {
498
- * "android": {
499
- * "osVer": "5.0",
500
- * "uniVer": "√",
501
- * "unixVer": "√"
502
- * },
503
- * "ios": {
504
- * "osVer": "10.0",
505
- * "uniVer": "√",
506
- * "unixVer": "4.05"
507
- * }
508
- * },
509
- * "mp": {
510
- * "weixin": {
511
- * "hostVer": "√",
512
- * "uniVer": "√",
513
- * "unixVer": "x"
514
- * },
515
- * "alipay": {
516
- * "hostVer": "√",
517
- * "uniVer": "√",
518
- * "unixVer": "x"
519
- * },
520
- * "baidu": {
521
- * "hostVer": "√",
522
- * "uniVer": "√",
523
- * "unixVer": "x"
524
- * },
525
- * "toutiao": {
526
- * "hostVer": "√",
527
- * "uniVer": "√",
528
- * "unixVer": "x"
529
- * },
530
- * "lark": {
531
- * "hostVer": "√",
532
- * "uniVer": "√",
533
- * "unixVer": "x"
534
- * },
535
- * "qq": {
536
- * "hostVer": "√",
537
- * "uniVer": "√",
538
- * "unixVer": "x"
539
- * },
540
- * "kuaishou": {
541
- * "hostVer": "√",
542
- * "uniVer": "√",
543
- * "unixVer": "x"
544
- * },
545
- * "jd": {
546
- * "hostVer": "√",
547
- * "uniVer": "√",
548
- * "unixVer": "x"
549
- * }
550
- * },
551
- * "web": {
552
- * "uniVer": "√",
553
- * "unixVer": "4.0"
554
- * }
555
- * }
556
- */
557
- loadFontFace(
558
- options: LoadFontFaceOptions
559
- ): Promise<LoadFontFaceSuccess> | null
560
- }
@@ -1,145 +0,0 @@
1
- import { AsyncApiSuccessResult } from '../../interface'
2
-
3
- /**
4
- * 设置页面滚动错误码
5
- * - 4: 框架内部异常
6
- */
7
- export type PageScrollToErrorCode = 4
8
- export interface PageScrollToError extends IUniError {
9
- errCode: PageScrollToErrorCode
10
- }
11
-
12
- export type PageScrollToSuccess = AsyncApiSuccessResult
13
- export type PageScrollToSuccessCallback = (result: PageScrollToSuccess) => void
14
- export type PageScrollToFail = PageScrollToError
15
- export type PageScrollToFailCallback = (result: PageScrollToFail) => void
16
- export type PageScrollToComplete = AsyncApiResult
17
- export type PageScrollToCompleteCallback = (
18
- result: PageScrollToComplete
19
- ) => void
20
- export type PageScrollToOptions = {
21
- /**
22
- * 滚动到页面的目标位置
23
- */
24
- scrollTop?: number | null
25
- /**
26
- * 选择器
27
- */
28
- selector?: string | null
29
- /**
30
- * 偏移距离,可以滚动到 selector 加偏移距离的位置
31
- * @uniPlatform {
32
- * "app": {
33
- * "android": {
34
- * "osVer": "5.0",
35
- * "uniVer": "x",
36
- * "unixVer": "3.91"
37
- * },
38
- * "ios": {
39
- * "osVer": "10.0",
40
- * "uniVer": "x",
41
- * "unixVer": "x"
42
- * }
43
- * },
44
- * "mp": {
45
- * "weixin": {
46
- * "hostVer": "√",
47
- * "uniVer": "√",
48
- * "unixVer": "x"
49
- * }
50
- * },
51
- * "web": {
52
- * "uniVer": "√",
53
- * "unixVer": "4.0"
54
- * }
55
- * }
56
- */
57
- offsetTop?: number | null
58
- /**
59
- * 滚动动画的时长
60
- */
61
- duration?: number | null
62
- /**
63
- * 接口调用成功的回调函数
64
- */
65
- success?: PageScrollToSuccessCallback | null
66
- /**
67
- * 接口调用失败的回调函数
68
- */
69
- fail?: PageScrollToFailCallback | null
70
- /**
71
- * 接口调用结束的回调函数(调用成功、失败都会执行)
72
- */
73
- complete?: PageScrollToCompleteCallback | null
74
- }
75
-
76
- export interface Uni {
77
- /**
78
- * 将页面滚动到目标位置
79
- *
80
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/page-scroll-to.html
81
- * @uniPlatform {
82
- * "app": {
83
- * "android": {
84
- * "osVer": "5.0",
85
- * "uniVer": "√",
86
- * "unixVer": "3.91"
87
- * },
88
- * "ios": {
89
- * "osVer": "10.0",
90
- * "uniVer": "√",
91
- * "unixVer": "4.05"
92
- * }
93
- * },
94
- * "mp": {
95
- * "weixin": {
96
- * "hostVer": "√",
97
- * "uniVer": "√",
98
- * "unixVer": "√"
99
- * },
100
- * "alipay": {
101
- * "hostVer": "√",
102
- * "uniVer": "√",
103
- * "unixVer": "√"
104
- * },
105
- * "baidu": {
106
- * "hostVer": "√",
107
- * "uniVer": "√",
108
- * "unixVer": "√"
109
- * },
110
- * "toutiao": {
111
- * "hostVer": "√",
112
- * "uniVer": "√",
113
- * "unixVer": "√"
114
- * },
115
- * "lark": {
116
- * "hostVer": "√",
117
- * "uniVer": "√",
118
- * "unixVer": "√"
119
- * },
120
- * "qq": {
121
- * "hostVer": "√",
122
- * "uniVer": "√",
123
- * "unixVer": "√"
124
- * },
125
- * "kuaishou": {
126
- * "hostVer": "√",
127
- * "uniVer": "√",
128
- * "unixVer": "√"
129
- * },
130
- * "jd": {
131
- * "hostVer": "√",
132
- * "uniVer": "√",
133
- * "unixVer": "√"
134
- * }
135
- * },
136
- * "web": {
137
- * "uniVer": "√",
138
- * "unixVer": "4.0"
139
- * }
140
- * }
141
- */
142
- pageScrollTo(
143
- options: PageScrollToOptions
144
- ): Promise<PageScrollToSuccess> | null
145
- }