@dcloudio/uni-app-x 0.7.35 → 0.7.37

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/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.7.35",
3
+ "version": "0.7.37",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
+ "main": "index.d.ts",
6
7
  "author": "DCloud",
7
8
  "license": "Apache-2.0",
8
9
  "type": "module",
@@ -0,0 +1,498 @@
1
+ export interface UniPage {
2
+ /**
3
+ * 页面的路由地址
4
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
5
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
6
+ * @uniPlatform {
7
+ * "app": {
8
+ * "android": {
9
+ * "osVer": "5.0",
10
+ * "uniVer": "x",
11
+ * "unixVer": "4.31"
12
+ * },
13
+ * "ios": {
14
+ * "osVer": "x",
15
+ * "uniVer": "x",
16
+ * "unixVer": "4.31",
17
+ * "unixUtsPlugin": "4.31"
18
+ * },
19
+ * "harmony": {
20
+ * "osVer": "x",
21
+ * "uniVer": "x",
22
+ * "unixVer": "x"
23
+ * }
24
+ * },
25
+ * "mp": {
26
+ * "weixin": {
27
+ * "hostVer": "√",
28
+ * "uniVer": "x",
29
+ * "unixVer": "x"
30
+ * },
31
+ * },
32
+ * "web": {
33
+ * "uniVer": "x",
34
+ * "unixVer": "4.31"
35
+ * }
36
+ * }
37
+ */
38
+ route: string
39
+ /**
40
+ * 页面的路由参数信息
41
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
42
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
43
+ * @uniPlatform {
44
+ * "app": {
45
+ * "android": {
46
+ * "osVer": "5.0",
47
+ * "uniVer": "x",
48
+ * "unixVer": "4.31"
49
+ * },
50
+ * "ios": {
51
+ * "osVer": "x",
52
+ * "uniVer": "x",
53
+ * "unixVer": "4.31",
54
+ * "unixUtsPlugin": "4.31"
55
+ * },
56
+ * "harmony": {
57
+ * "osVer": "x",
58
+ * "uniVer": "x",
59
+ * "unixVer": "x"
60
+ * }
61
+ * },
62
+ * "mp": {
63
+ * "weixin": {
64
+ * "hostVer": "√",
65
+ * "uniVer": "x",
66
+ * "unixVer": "x"
67
+ * },
68
+ * },
69
+ * "web": {
70
+ * "uniVer": "x",
71
+ * "unixVer": "4.31"
72
+ * }
73
+ * }
74
+ */
75
+ options: UTSJSONObject
76
+ /**
77
+ * UniPage vue 实例对象
78
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
79
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
80
+ * @uniPlatform {
81
+ * "app": {
82
+ * "android": {
83
+ * "osVer": "5.0",
84
+ * "uniVer": "x",
85
+ * "unixVer": "4.31"
86
+ * },
87
+ * "ios": {
88
+ * "osVer": "x",
89
+ * "uniVer": "x",
90
+ * "unixVer": "4.31"
91
+ * },
92
+ * "harmony": {
93
+ * "osVer": "x",
94
+ * "uniVer": "x",
95
+ * "unixVer": "x"
96
+ * }
97
+ * },
98
+ * "mp": {
99
+ * "weixin": {
100
+ * "hostVer": "√",
101
+ * "uniVer": "x",
102
+ * "unixVer": "x"
103
+ * },
104
+ * },
105
+ * "web": {
106
+ * "uniVer": "x",
107
+ * "unixVer": "4.31"
108
+ * }
109
+ * }
110
+ */
111
+ vm: ComponentPublicInstance | null
112
+ /**
113
+ * UniPage vue 实例对象
114
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
115
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
116
+ * @uniPlatform {
117
+ * "app": {
118
+ * "android": {
119
+ * "osVer": "5.0",
120
+ * "uniVer": "x",
121
+ * "unixVer": "4.31"
122
+ * },
123
+ * "ios": {
124
+ * "osVer": "x",
125
+ * "uniVer": "x",
126
+ * "unixVer": "4.31"
127
+ * },
128
+ * "harmony": {
129
+ * "osVer": "x",
130
+ * "uniVer": "x",
131
+ * "unixVer": "x"
132
+ * }
133
+ * },
134
+ * "mp": {
135
+ * "weixin": {
136
+ * "hostVer": "√",
137
+ * "uniVer": "x",
138
+ * "unixVer": "x"
139
+ * },
140
+ * },
141
+ * "web": {
142
+ * "uniVer": "x",
143
+ * "unixVer": "4.31"
144
+ * }
145
+ * }
146
+ */
147
+ $vm: ComponentPublicInstance | null
148
+ /**
149
+ * 获取当前页面样式 \
150
+ * 包含 pages.json 页面下的 style 节点属性和根节点 globalStyle 属性
151
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getpagestyle
152
+ * @uniPlatform {
153
+ * "app": {
154
+ * "android": {
155
+ * "osVer": "5.0",
156
+ * "uniVer": "x",
157
+ * "unixVer": "4.31"
158
+ * },
159
+ * "ios": {
160
+ * "osVer": "x",
161
+ * "uniVer": "x",
162
+ * "unixVer": "4.31",
163
+ * "unixUtsPlugin": "4.31"
164
+ * },
165
+ * "harmony": {
166
+ * "osVer": "x",
167
+ * "uniVer": "x",
168
+ * "unixVer": "x"
169
+ * }
170
+ * },
171
+ * "mp": {
172
+ * "weixin": {
173
+ * "hostVer": "√",
174
+ * "uniVer": "x",
175
+ * "unixVer": "x"
176
+ * },
177
+ * },
178
+ * "web": {
179
+ * "uniVer": "x",
180
+ * "unixVer": "4.31"
181
+ * }
182
+ * }
183
+ */
184
+ getPageStyle(): UTSJSONObject
185
+ /**
186
+ * 获取当前页面样式 \
187
+ * 包含 pages.json 页面下的 style 节点属性和根节点 globalStyle 属性
188
+ * @deprecated 已废弃,仅为了向下兼容保留
189
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getpagestyle-2
190
+ * @uniPlatform {
191
+ * "app": {
192
+ * "android": {
193
+ * "osVer": "5.0",
194
+ * "uniVer": "x",
195
+ * "unixVer": "4.13"
196
+ * },
197
+ * "ios": {
198
+ * "osVer": "x",
199
+ * "uniVer": "x",
200
+ * "unixVer": "4.13"
201
+ * },
202
+ * "harmony": {
203
+ * "osVer": "x",
204
+ * "uniVer": "x",
205
+ * "unixVer": "x"
206
+ * }
207
+ * },
208
+ * "mp": {
209
+ * "weixin": {
210
+ * "hostVer": "√",
211
+ * "uniVer": "x",
212
+ * "unixVer": "x"
213
+ * },
214
+ * },
215
+ * "web": {
216
+ * "uniVer": "x",
217
+ * "unixVer": "4.13"
218
+ * }
219
+ * }
220
+ */
221
+ $getPageStyle(): UTSJSONObject
222
+ /**
223
+ * 设置当前页面样式 \
224
+ * 支持 pages.json 页面下的 style 节点属性和根节点 globalStyle 属性
225
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#setpagestyle
226
+ * @uniPlatform {
227
+ * "app": {
228
+ * "android": {
229
+ * "osVer": "5.0",
230
+ * "uniVer": "x",
231
+ * "unixVer": "4.31"
232
+ * },
233
+ * "ios": {
234
+ * "osVer": "x",
235
+ * "uniVer": "x",
236
+ * "unixVer": "4.31",
237
+ * "unixUtsPlugin": "4.31"
238
+ * },
239
+ * "harmony": {
240
+ * "osVer": "x",
241
+ * "uniVer": "x",
242
+ * "unixVer": "x"
243
+ * }
244
+ * },
245
+ * "mp": {
246
+ * "weixin": {
247
+ * "hostVer": "√",
248
+ * "uniVer": "x",
249
+ * "unixVer": "x"
250
+ * },
251
+ * },
252
+ * "web": {
253
+ * "uniVer": "x",
254
+ * "unixVer": "4.31"
255
+ * }
256
+ * }
257
+ */
258
+ setPageStyle(style: UTSJSONObject): void
259
+ /**
260
+ * 设置当前页面样式 \
261
+ * 支持 pages.json 页面下的 style 节点属性和根节点 globalStyle 属性
262
+ * @deprecated 已废弃,仅为了向下兼容保留
263
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#setpagestyle-2
264
+ * @uniPlatform {
265
+ * "app": {
266
+ * "android": {
267
+ * "osVer": "5.0",
268
+ * "uniVer": "x",
269
+ * "unixVer": "4.13"
270
+ * },
271
+ * "ios": {
272
+ * "osVer": "x",
273
+ * "uniVer": "x",
274
+ * "unixVer": "4.13"
275
+ * },
276
+ * "harmony": {
277
+ * "osVer": "x",
278
+ * "uniVer": "x",
279
+ * "unixVer": "x"
280
+ * }
281
+ * },
282
+ * "mp": {
283
+ * "weixin": {
284
+ * "hostVer": "√",
285
+ * "uniVer": "x",
286
+ * "unixVer": "x"
287
+ * },
288
+ * },
289
+ * "web": {
290
+ * "uniVer": "x",
291
+ * "unixVer": "4.13"
292
+ * }
293
+ * }
294
+ */
295
+ $setPageStyle(style: UTSJSONObject): void
296
+ /**
297
+ * 获取所属父页面
298
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
299
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
300
+ * @uniPlatform {
301
+ * "app": {
302
+ * "android": {
303
+ * "osVer": "5.0",
304
+ * "uniVer": "x",
305
+ * "unixVer": "4.31"
306
+ * },
307
+ * "ios": {
308
+ * "osVer": "x",
309
+ * "uniVer": "x",
310
+ * "unixVer": "4.31",
311
+ * "unixUtsPlugin": "4.31"
312
+ * },
313
+ * "harmony": {
314
+ * "osVer": "x",
315
+ * "uniVer": "x",
316
+ * "unixVer": "x"
317
+ * }
318
+ * },
319
+ * "mp": {
320
+ * "weixin": {
321
+ * "hostVer": "√",
322
+ * "uniVer": "x",
323
+ * "unixVer": "x"
324
+ * },
325
+ * },
326
+ * "web": {
327
+ * "uniVer": "x",
328
+ * "unixVer": "4.31"
329
+ * }
330
+ * }
331
+ */
332
+ getParentPage(): UniPage | null
333
+ /**
334
+ * 获取当前页面的 dialog 子页面集合
335
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
336
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
337
+ * @uniPlatform {
338
+ * "app": {
339
+ * "android": {
340
+ * "osVer": "5.0",
341
+ * "uniVer": "x",
342
+ * "unixVer": "4.31"
343
+ * },
344
+ * "ios": {
345
+ * "osVer": "x",
346
+ * "uniVer": "x",
347
+ * "unixVer": "4.31",
348
+ * "unixUtsPlugin": "4.31"
349
+ * },
350
+ * "harmony": {
351
+ * "osVer": "x",
352
+ * "uniVer": "x",
353
+ * "unixVer": "x"
354
+ * }
355
+ * },
356
+ * "mp": {
357
+ * "weixin": {
358
+ * "hostVer": "√",
359
+ * "uniVer": "x",
360
+ * "unixVer": "x"
361
+ * },
362
+ * },
363
+ * "web": {
364
+ * "uniVer": "x",
365
+ * "unixVer": "4.31"
366
+ * }
367
+ * }
368
+ */
369
+ getDialogPages(): UniPage[]
370
+ /**
371
+ * 返回一个匹配特定 ID 的元素, 如果不存在,返回 null。\
372
+ * 如果需要获取指定的节点类型,需要使用 as 进行类型转换。\
373
+ * ID 区分大小写,且应该是唯一的。如果存在多个匹配的元素,则返回第一个匹配的元素。
374
+ *
375
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getelementbyid
376
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getelementbyid
377
+ * @uniPlatform {
378
+ * "app": {
379
+ * "android": {
380
+ * "osVer": "5.0",
381
+ * "uniVer": "x",
382
+ * "unixVer": "4.31"
383
+ * },
384
+ * "ios": {
385
+ * "osVer": "x",
386
+ * "uniVer": "x",
387
+ * "unixVer": "4.31"
388
+ * },
389
+ * "harmony": {
390
+ * "osVer": "x",
391
+ * "uniVer": "x",
392
+ * "unixVer": "x"
393
+ * }
394
+ * },
395
+ * "mp": {
396
+ * "weixin": {
397
+ * "hostVer": "√",
398
+ * "uniVer": "x",
399
+ * "unixVer": "x"
400
+ * },
401
+ * },
402
+ * "web": {
403
+ * "uniVer": "x",
404
+ * "unixVer": "4.31"
405
+ * }
406
+ * }
407
+ */
408
+ getElementById(id: string.IDString | string): UniElement | null
409
+ /**
410
+ * 返回 android 平台页面根 view
411
+ *
412
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getandroidview
413
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getandroidview
414
+ * @uniPlatform {
415
+ * "app": {
416
+ * "android": {
417
+ * "osVer": "5.0",
418
+ * "uniVer": "x",
419
+ * "unixVer": "4.31"
420
+ * },
421
+ * "ios": {
422
+ * "osVer": "x",
423
+ * "uniVer": "x",
424
+ * "unixVer": "x"
425
+ * },
426
+ * "harmony": {
427
+ * "osVer": "x",
428
+ * "uniVer": "x",
429
+ * "unixVer": "x"
430
+ * }
431
+ * },
432
+ * "mp": {
433
+ * "weixin": {
434
+ * "hostVer": "√",
435
+ * "uniVer": "x",
436
+ * "unixVer": "x"
437
+ * },
438
+ * },
439
+ * "web": {
440
+ * "uniVer": "x",
441
+ * "unixVer": "x"
442
+ * }
443
+ * }
444
+ */
445
+ getAndroidView(): View | null
446
+ /**
447
+ * 返回页面 HTML Element 对象
448
+ *
449
+ * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#gethtmlelement
450
+ * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#gethtmlelement
451
+ * @uniPlatform {
452
+ * "app": {
453
+ * "android": {
454
+ * "osVer": "5.0",
455
+ * "uniVer": "x",
456
+ * "unixVer": "x"
457
+ * },
458
+ * "ios": {
459
+ * "osVer": "x",
460
+ * "uniVer": "x",
461
+ * "unixVer": "x"
462
+ * },
463
+ * "harmony": {
464
+ * "osVer": "x",
465
+ * "uniVer": "x",
466
+ * "unixVer": "x"
467
+ * }
468
+ * },
469
+ * "mp": {
470
+ * "weixin": {
471
+ * "hostVer": "√",
472
+ * "uniVer": "x",
473
+ * "unixVer": "x"
474
+ * },
475
+ * },
476
+ * "web": {
477
+ * "uniVer": "x",
478
+ * "unixVer": "4.31"
479
+ * }
480
+ * }
481
+ */
482
+ getHTMLElement(): UniElement | null
483
+ }
484
+
485
+ export interface UniNormalPage extends UniPage {
486
+
487
+ }
488
+
489
+ export interface UniDialogPage extends UniPage {
490
+ /**
491
+ * @internal
492
+ */
493
+ $component: any | null
494
+ /**
495
+ * @internal
496
+ */
497
+ $disableEscBack: boolean
498
+ }
package/types/page.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /// <reference path='./common.d.ts' />
2
+ import { UniDialogPage, UniNormalPage, UniPage } from './UniPage'
2
3
 
3
4
  interface CustomShareContent {
4
5
  /**
@@ -1604,503 +1605,12 @@ interface Page {
1604
1605
 
1605
1606
  type PageOrigin = Page
1606
1607
 
1607
- export interface UniPage {
1608
- /**
1609
- * 页面的路由地址
1610
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
1611
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
1612
- * @uniPlatform {
1613
- * "app": {
1614
- * "android": {
1615
- * "osVer": "5.0",
1616
- * "uniVer": "x",
1617
- * "unixVer": "4.31"
1618
- * },
1619
- * "ios": {
1620
- * "osVer": "x",
1621
- * "uniVer": "x",
1622
- * "unixVer": "4.31",
1623
- * "unixUtsPlugin": "4.31"
1624
- * },
1625
- * "harmony": {
1626
- * "osVer": "x",
1627
- * "uniVer": "x",
1628
- * "unixVer": "x"
1629
- * }
1630
- * },
1631
- * "mp": {
1632
- * "weixin": {
1633
- * "hostVer": "√",
1634
- * "uniVer": "x",
1635
- * "unixVer": "x"
1636
- * },
1637
- * },
1638
- * "web": {
1639
- * "uniVer": "x",
1640
- * "unixVer": "4.31"
1641
- * }
1642
- * }
1643
- */
1644
- route: string
1645
- /**
1646
- * 页面的路由参数信息
1647
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
1648
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
1649
- * @uniPlatform {
1650
- * "app": {
1651
- * "android": {
1652
- * "osVer": "5.0",
1653
- * "uniVer": "x",
1654
- * "unixVer": "4.31"
1655
- * },
1656
- * "ios": {
1657
- * "osVer": "x",
1658
- * "uniVer": "x",
1659
- * "unixVer": "4.31",
1660
- * "unixUtsPlugin": "4.31"
1661
- * },
1662
- * "harmony": {
1663
- * "osVer": "x",
1664
- * "uniVer": "x",
1665
- * "unixVer": "x"
1666
- * }
1667
- * },
1668
- * "mp": {
1669
- * "weixin": {
1670
- * "hostVer": "√",
1671
- * "uniVer": "x",
1672
- * "unixVer": "x"
1673
- * },
1674
- * },
1675
- * "web": {
1676
- * "uniVer": "x",
1677
- * "unixVer": "4.31"
1678
- * }
1679
- * }
1680
- */
1681
- options: UTSJSONObject
1682
- /**
1683
- * UniPage vue 实例对象
1684
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
1685
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
1686
- * @uniPlatform {
1687
- * "app": {
1688
- * "android": {
1689
- * "osVer": "5.0",
1690
- * "uniVer": "x",
1691
- * "unixVer": "4.31"
1692
- * },
1693
- * "ios": {
1694
- * "osVer": "x",
1695
- * "uniVer": "x",
1696
- * "unixVer": "4.31"
1697
- * },
1698
- * "harmony": {
1699
- * "osVer": "x",
1700
- * "uniVer": "x",
1701
- * "unixVer": "x"
1702
- * }
1703
- * },
1704
- * "mp": {
1705
- * "weixin": {
1706
- * "hostVer": "√",
1707
- * "uniVer": "x",
1708
- * "unixVer": "x"
1709
- * },
1710
- * },
1711
- * "web": {
1712
- * "uniVer": "x",
1713
- * "unixVer": "4.31"
1714
- * }
1715
- * }
1716
- */
1717
- vm: ComponentPublicInstance | null
1718
- /**
1719
- * UniPage vue 实例对象
1720
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
1721
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html
1722
- * @uniPlatform {
1723
- * "app": {
1724
- * "android": {
1725
- * "osVer": "5.0",
1726
- * "uniVer": "x",
1727
- * "unixVer": "4.31"
1728
- * },
1729
- * "ios": {
1730
- * "osVer": "x",
1731
- * "uniVer": "x",
1732
- * "unixVer": "4.31"
1733
- * },
1734
- * "harmony": {
1735
- * "osVer": "x",
1736
- * "uniVer": "x",
1737
- * "unixVer": "x"
1738
- * }
1739
- * },
1740
- * "mp": {
1741
- * "weixin": {
1742
- * "hostVer": "√",
1743
- * "uniVer": "x",
1744
- * "unixVer": "x"
1745
- * },
1746
- * },
1747
- * "web": {
1748
- * "uniVer": "x",
1749
- * "unixVer": "4.31"
1750
- * }
1751
- * }
1752
- */
1753
- $vm: ComponentPublicInstance | null
1754
- /**
1755
- * 获取当前页面样式 \
1756
- * 包含 pages.json 页面下的 style 节点属性和根节点 globalStyle 属性
1757
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getpagestyle
1758
- * @uniPlatform {
1759
- * "app": {
1760
- * "android": {
1761
- * "osVer": "5.0",
1762
- * "uniVer": "x",
1763
- * "unixVer": "4.31"
1764
- * },
1765
- * "ios": {
1766
- * "osVer": "x",
1767
- * "uniVer": "x",
1768
- * "unixVer": "4.31",
1769
- * "unixUtsPlugin": "4.31"
1770
- * },
1771
- * "harmony": {
1772
- * "osVer": "x",
1773
- * "uniVer": "x",
1774
- * "unixVer": "x"
1775
- * }
1776
- * },
1777
- * "mp": {
1778
- * "weixin": {
1779
- * "hostVer": "√",
1780
- * "uniVer": "x",
1781
- * "unixVer": "x"
1782
- * },
1783
- * },
1784
- * "web": {
1785
- * "uniVer": "x",
1786
- * "unixVer": "4.31"
1787
- * }
1788
- * }
1789
- */
1790
- getPageStyle(): UTSJSONObject
1791
- /**
1792
- * 获取当前页面样式 \
1793
- * 包含 pages.json 页面下的 style 节点属性和根节点 globalStyle 属性
1794
- * @deprecated 已废弃,仅为了向下兼容保留
1795
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getpagestyle-2
1796
- * @uniPlatform {
1797
- * "app": {
1798
- * "android": {
1799
- * "osVer": "5.0",
1800
- * "uniVer": "x",
1801
- * "unixVer": "4.13"
1802
- * },
1803
- * "ios": {
1804
- * "osVer": "x",
1805
- * "uniVer": "x",
1806
- * "unixVer": "4.13"
1807
- * },
1808
- * "harmony": {
1809
- * "osVer": "x",
1810
- * "uniVer": "x",
1811
- * "unixVer": "x"
1812
- * }
1813
- * },
1814
- * "mp": {
1815
- * "weixin": {
1816
- * "hostVer": "√",
1817
- * "uniVer": "x",
1818
- * "unixVer": "x"
1819
- * },
1820
- * },
1821
- * "web": {
1822
- * "uniVer": "x",
1823
- * "unixVer": "4.13"
1824
- * }
1825
- * }
1826
- */
1827
- $getPageStyle(): UTSJSONObject
1828
- /**
1829
- * 设置当前页面样式 \
1830
- * 支持 pages.json 页面下的 style 节点属性和根节点 globalStyle 属性
1831
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#setpagestyle
1832
- * @uniPlatform {
1833
- * "app": {
1834
- * "android": {
1835
- * "osVer": "5.0",
1836
- * "uniVer": "x",
1837
- * "unixVer": "4.31"
1838
- * },
1839
- * "ios": {
1840
- * "osVer": "x",
1841
- * "uniVer": "x",
1842
- * "unixVer": "4.31",
1843
- * "unixUtsPlugin": "4.31"
1844
- * },
1845
- * "harmony": {
1846
- * "osVer": "x",
1847
- * "uniVer": "x",
1848
- * "unixVer": "x"
1849
- * }
1850
- * },
1851
- * "mp": {
1852
- * "weixin": {
1853
- * "hostVer": "√",
1854
- * "uniVer": "x",
1855
- * "unixVer": "x"
1856
- * },
1857
- * },
1858
- * "web": {
1859
- * "uniVer": "x",
1860
- * "unixVer": "4.31"
1861
- * }
1862
- * }
1863
- */
1864
- setPageStyle(style: UTSJSONObject): void
1865
- /**
1866
- * 设置当前页面样式 \
1867
- * 支持 pages.json 页面下的 style 节点属性和根节点 globalStyle 属性
1868
- * @deprecated 已废弃,仅为了向下兼容保留
1869
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#setpagestyle-2
1870
- * @uniPlatform {
1871
- * "app": {
1872
- * "android": {
1873
- * "osVer": "5.0",
1874
- * "uniVer": "x",
1875
- * "unixVer": "4.13"
1876
- * },
1877
- * "ios": {
1878
- * "osVer": "x",
1879
- * "uniVer": "x",
1880
- * "unixVer": "4.13"
1881
- * },
1882
- * "harmony": {
1883
- * "osVer": "x",
1884
- * "uniVer": "x",
1885
- * "unixVer": "x"
1886
- * }
1887
- * },
1888
- * "mp": {
1889
- * "weixin": {
1890
- * "hostVer": "√",
1891
- * "uniVer": "x",
1892
- * "unixVer": "x"
1893
- * },
1894
- * },
1895
- * "web": {
1896
- * "uniVer": "x",
1897
- * "unixVer": "4.13"
1898
- * }
1899
- * }
1900
- */
1901
- $setPageStyle(style: UTSJSONObject): void
1902
- /**
1903
- * 获取所属父页面
1904
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
1905
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
1906
- * @uniPlatform {
1907
- * "app": {
1908
- * "android": {
1909
- * "osVer": "5.0",
1910
- * "uniVer": "x",
1911
- * "unixVer": "4.31"
1912
- * },
1913
- * "ios": {
1914
- * "osVer": "x",
1915
- * "uniVer": "x",
1916
- * "unixVer": "4.31",
1917
- * "unixUtsPlugin": "4.31"
1918
- * },
1919
- * "harmony": {
1920
- * "osVer": "x",
1921
- * "uniVer": "x",
1922
- * "unixVer": "x"
1923
- * }
1924
- * },
1925
- * "mp": {
1926
- * "weixin": {
1927
- * "hostVer": "√",
1928
- * "uniVer": "x",
1929
- * "unixVer": "x"
1930
- * },
1931
- * },
1932
- * "web": {
1933
- * "uniVer": "x",
1934
- * "unixVer": "4.31"
1935
- * }
1936
- * }
1937
- */
1938
- getParentPage(): UniPage | null
1939
- /**
1940
- * 获取当前页面的 dialog 子页面集合
1941
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
1942
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#emit
1943
- * @uniPlatform {
1944
- * "app": {
1945
- * "android": {
1946
- * "osVer": "5.0",
1947
- * "uniVer": "x",
1948
- * "unixVer": "4.31"
1949
- * },
1950
- * "ios": {
1951
- * "osVer": "x",
1952
- * "uniVer": "x",
1953
- * "unixVer": "4.31",
1954
- * "unixUtsPlugin": "4.31"
1955
- * },
1956
- * "harmony": {
1957
- * "osVer": "x",
1958
- * "uniVer": "x",
1959
- * "unixVer": "x"
1960
- * }
1961
- * },
1962
- * "mp": {
1963
- * "weixin": {
1964
- * "hostVer": "√",
1965
- * "uniVer": "x",
1966
- * "unixVer": "x"
1967
- * },
1968
- * },
1969
- * "web": {
1970
- * "uniVer": "x",
1971
- * "unixVer": "4.31"
1972
- * }
1973
- * }
1974
- */
1975
- getDialogPages(): UniPage[]
1976
- /**
1977
- * 返回一个匹配特定 ID 的元素, 如果不存在,返回 null。\
1978
- * 如果需要获取指定的节点类型,需要使用 as 进行类型转换。\
1979
- * ID 区分大小写,且应该是唯一的。如果存在多个匹配的元素,则返回第一个匹配的元素。
1980
- *
1981
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getelementbyid
1982
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getelementbyid
1983
- * @uniPlatform {
1984
- * "app": {
1985
- * "android": {
1986
- * "osVer": "5.0",
1987
- * "uniVer": "x",
1988
- * "unixVer": "4.31"
1989
- * },
1990
- * "ios": {
1991
- * "osVer": "x",
1992
- * "uniVer": "x",
1993
- * "unixVer": "4.31"
1994
- * },
1995
- * "harmony": {
1996
- * "osVer": "x",
1997
- * "uniVer": "x",
1998
- * "unixVer": "x"
1999
- * }
2000
- * },
2001
- * "mp": {
2002
- * "weixin": {
2003
- * "hostVer": "√",
2004
- * "uniVer": "x",
2005
- * "unixVer": "x"
2006
- * },
2007
- * },
2008
- * "web": {
2009
- * "uniVer": "x",
2010
- * "unixVer": "4.31"
2011
- * }
2012
- * }
2013
- */
2014
- getElementById(id: string.IDString | string): UniElement | null
2015
- /**
2016
- * 返回 android 平台页面根 view
2017
- *
2018
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getandroidview
2019
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#getandroidview
2020
- * @uniPlatform {
2021
- * "app": {
2022
- * "android": {
2023
- * "osVer": "5.0",
2024
- * "uniVer": "x",
2025
- * "unixVer": "4.31"
2026
- * },
2027
- * "ios": {
2028
- * "osVer": "x",
2029
- * "uniVer": "x",
2030
- * "unixVer": "x"
2031
- * },
2032
- * "harmony": {
2033
- * "osVer": "x",
2034
- * "uniVer": "x",
2035
- * "unixVer": "x"
2036
- * }
2037
- * },
2038
- * "mp": {
2039
- * "weixin": {
2040
- * "hostVer": "√",
2041
- * "uniVer": "x",
2042
- * "unixVer": "x"
2043
- * },
2044
- * },
2045
- * "web": {
2046
- * "uniVer": "x",
2047
- * "unixVer": "x"
2048
- * }
2049
- * }
2050
- */
2051
- getAndroidView(): View | null
2052
- /**
2053
- * 返回页面 HTML Element 对象
2054
- *
2055
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#gethtmlelement
2056
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-current-pages.html#gethtmlelement
2057
- * @uniPlatform {
2058
- * "app": {
2059
- * "android": {
2060
- * "osVer": "5.0",
2061
- * "uniVer": "x",
2062
- * "unixVer": "x"
2063
- * },
2064
- * "ios": {
2065
- * "osVer": "x",
2066
- * "uniVer": "x",
2067
- * "unixVer": "x"
2068
- * },
2069
- * "harmony": {
2070
- * "osVer": "x",
2071
- * "uniVer": "x",
2072
- * "unixVer": "x"
2073
- * }
2074
- * },
2075
- * "mp": {
2076
- * "weixin": {
2077
- * "hostVer": "√",
2078
- * "uniVer": "x",
2079
- * "unixVer": "x"
2080
- * },
2081
- * },
2082
- * "web": {
2083
- * "uniVer": "x",
2084
- * "unixVer": "4.31"
2085
- * }
2086
- * }
2087
- */
2088
- getHTMLElement(): UniElement | null
2089
- }
1608
+ export { UniPage }
2090
1609
  type UniPageOrigin = UniPage
2091
1610
 
2092
- export interface UniNormalPage extends UniPage {}
1611
+ export { UniNormalPage }
2093
1612
 
2094
- export interface UniDialogPage extends UniPage {
2095
- /**
2096
- * @internal
2097
- */
2098
- $component: any | null
2099
- /**
2100
- * @internal
2101
- */
2102
- $disableEscBack: boolean
2103
- }
1613
+ export { UniDialogPage }
2104
1614
 
2105
1615
  declare global {
2106
1616
  /**
@@ -2180,6 +1690,3 @@ declare module '@vue/runtime-core' {
2180
1690
 
2181
1691
  }
2182
1692
  }
2183
-
2184
-
2185
- export {}
@@ -403,75 +403,6 @@ export type OpenDialogPageOptions = {
403
403
  */
404
404
  parentPage?: UniPage | null
405
405
 
406
- /**
407
- * 页面间通信接口,用于监听被打开页面发送到当前页面的数据
408
- * @uniPlatform {
409
- * "app": {
410
- * "android": {
411
- * "osVer": "5.0",
412
- * "uniVer": "x",
413
- * "unixVer": "4.31"
414
- * },
415
- * "ios": {
416
- * "osVer": "12.0",
417
- * "uniVer": "x",
418
- * "unixVer": "4.31"
419
- * },
420
- * "harmony": {
421
- * "osVer": "3.0",
422
- * "uniVer": "x",
423
- * "unixVer": "x"
424
- * }
425
- * },
426
- * "mp": {
427
- * "weixin": {
428
- * "hostVer": "√",
429
- * "uniVer": "x",
430
- * "unixVer": "x"
431
- * },
432
- * "alipay": {
433
- * "hostVer": "√",
434
- * "uniVer": "x",
435
- * "unixVer": "x"
436
- * },
437
- * "baidu": {
438
- * "hostVer": "√",
439
- * "uniVer": "x",
440
- * "unixVer": "x"
441
- * },
442
- * "toutiao": {
443
- * "hostVer": "√",
444
- * "uniVer": "x",
445
- * "unixVer": "x"
446
- * },
447
- * "lark": {
448
- * "hostVer": "√",
449
- * "uniVer": "x",
450
- * "unixVer": "x"
451
- * },
452
- * "qq": {
453
- * "hostVer": "√",
454
- * "uniVer": "x",
455
- * "unixVer": "x"
456
- * },
457
- * "kuaishou": {
458
- * "hostVer": "√",
459
- * "uniVer": "x",
460
- * "unixVer": "x"
461
- * },
462
- * "jd": {
463
- * "hostVer": "√",
464
- * "uniVer": "x",
465
- * "unixVer": "x"
466
- * }
467
- * },
468
- * "web": {
469
- * "uniVer": "x",
470
- * "unixVer": "4.31"
471
- * }
472
- * }
473
- */
474
- events ?: any | null
475
406
  /**
476
407
  * 接口调用成功的回调函数
477
408
  * @uniPlatform {
@@ -945,75 +876,7 @@ export type CloseDialogPageOptions = {
945
876
  * }
946
877
  */
947
878
  animationDuration ?: number | null
948
- /**
949
- * 页面间通信接口,用于监听被打开页面发送到当前页面的数据
950
- * @uniPlatform {
951
- * "app": {
952
- * "android": {
953
- * "osVer": "5.0",
954
- * "uniVer": "x",
955
- * "unixVer": "4.31"
956
- * },
957
- * "ios": {
958
- * "osVer": "12.0",
959
- * "uniVer": "x",
960
- * "unixVer": "4.31"
961
- * },
962
- * "harmony": {
963
- * "osVer": "3.0",
964
- * "uniVer": "x",
965
- * "unixVer": "x"
966
- * }
967
- * },
968
- * "mp": {
969
- * "weixin": {
970
- * "hostVer": "√",
971
- * "uniVer": "x",
972
- * "unixVer": "x"
973
- * },
974
- * "alipay": {
975
- * "hostVer": "√",
976
- * "uniVer": "x",
977
- * "unixVer": "x"
978
- * },
979
- * "baidu": {
980
- * "hostVer": "√",
981
- * "uniVer": "x",
982
- * "unixVer": "x"
983
- * },
984
- * "toutiao": {
985
- * "hostVer": "√",
986
- * "uniVer": "x",
987
- * "unixVer": "x"
988
- * },
989
- * "lark": {
990
- * "hostVer": "√",
991
- * "uniVer": "x",
992
- * "unixVer": "x"
993
- * },
994
- * "qq": {
995
- * "hostVer": "√",
996
- * "uniVer": "x",
997
- * "unixVer": "x"
998
- * },
999
- * "kuaishou": {
1000
- * "hostVer": "√",
1001
- * "uniVer": "x",
1002
- * "unixVer": "x"
1003
- * },
1004
- * "jd": {
1005
- * "hostVer": "√",
1006
- * "uniVer": "x",
1007
- * "unixVer": "x"
1008
- * }
1009
- * },
1010
- * "web": {
1011
- * "uniVer": "x",
1012
- * "unixVer": "4.31"
1013
- * }
1014
- * }
1015
- */
1016
- events ?: any | null
879
+
1017
880
  /**
1018
881
  * 接口调用成功的回调函数
1019
882
  * @uniPlatform {
@@ -11,6 +11,7 @@ export type $Emit = (eventName: string, args: any | null) => void
11
11
  export interface Uni {
12
12
  /**
13
13
  * 监听自定义事件。事件可以由 uni.$emit 触发。回调函数会接收 uni.$emit 传递的参数。
14
+ * 4.31+ 开始支持返回事件监听器 id, 用于 off 事件监听器。
14
15
  *
15
16
  * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#on
16
17
  * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#on
@@ -85,6 +86,7 @@ export interface Uni {
85
86
  /**
86
87
  * 移除自定义事件监听器。如果提供了事件名和回调,则只移除这个回调的监听器。
87
88
  * 4.13+ 开始支持第二个参数为可选,如果仅提供事件名,则移除该事件的所有监听器。
89
+ * 4.31+ 开始支持第二个参数传入 `uni.$on`、`uni.$once` 返回的事件监听器 id, 移除指定事件监听器。
88
90
  * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#off
89
91
  * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#off
90
92
  * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/window/communication.html#off
@@ -157,6 +159,7 @@ export interface Uni {
157
159
  $off(eventName: string, callback?: any | null): void
158
160
  /**
159
161
  * 监听一个自定义事件。事件只触发一次,在第一次触发之后移除事件监听器。
162
+ * 4.31+ 开始支持返回事件监听器 id, 用于 off 事件监听器。
160
163
  *
161
164
  * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#once
162
165
  * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/event-bus.html#once
@@ -873,7 +873,7 @@ export interface Uni {
873
873
  * },
874
874
  * "harmony": {
875
875
  * "osVer": "3.0",
876
- * "uniVer": "4.24",
876
+ * "uniVer": "4.28",
877
877
  * "unixVer": "x"
878
878
  * }
879
879
  * },
@@ -946,7 +946,7 @@ export interface Uni {
946
946
  * },
947
947
  * "harmony": {
948
948
  * "osVer": "3.0",
949
- * "uniVer": "4.24",
949
+ * "uniVer": "4.28",
950
950
  * "unixVer": "x"
951
951
  * }
952
952
  * },
@@ -507,8 +507,8 @@ export type ShowToast = (options: ShowToastOptions) => void
507
507
  * "unixVer": "4.11"
508
508
  * },
509
509
  * "harmony": {
510
- * "osVer": "3.0",
511
- * "uniVer": "4.23",
510
+ * "osVer": "x",
511
+ * "uniVer": "x",
512
512
  * "unixVer": "x"
513
513
  * }
514
514
  * },
@@ -1,3 +0,0 @@
1
- 此目录存放uni-app支持但是uni-app-x安卓端暂未支持的api类型定义
2
-
3
- 目前为手动维护,暂未严格划分模块