@dcloudio/uni-app-x 0.4.6 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +39 -0
  2. package/package.json +5 -3
  3. package/types/app.d.ts +36 -82
  4. package/types/native/CSSStyleDeclaration.d.ts +2 -2
  5. package/types/native/CustomEvent.d.ts +0 -2
  6. package/types/native/DOMRect.d.ts +4 -4
  7. package/types/native/DomNode.d.ts +48 -0
  8. package/types/native/DrawableContext.d.ts +42 -16
  9. package/types/native/Element.d.ts +234 -0
  10. package/types/native/Event.d.ts +14 -3
  11. package/types/native/IDocument.d.ts +6 -6
  12. package/types/native/IPage.d.ts +27 -11
  13. package/types/native/IPageManager.d.ts +2 -2
  14. package/types/native/ITabsNode.d.ts +4 -4
  15. package/types/native/IUniError.d.ts +20 -0
  16. package/types/native/IWebViewNode.d.ts +2 -2
  17. package/types/native/InputBlurEvent.d.ts +13 -0
  18. package/types/native/InputConfirmEvent.d.ts +13 -0
  19. package/types/native/InputEvent.d.ts +21 -0
  20. package/types/native/InputFocusEvent.d.ts +17 -0
  21. package/types/native/InputKeyboardHeightChangeEvent.d.ts +17 -0
  22. package/types/native/MouseEvent.d.ts +13 -1
  23. package/types/native/NestedPreScrollEvent.d.ts +23 -0
  24. package/types/native/ScrollToLowerEvent.d.ts +4 -1
  25. package/types/native/ScrollToUpperEvent.d.ts +5 -2
  26. package/types/native/SourceError.d.ts +0 -2
  27. package/types/native/StartNestedScrollEvent.d.ts +12 -0
  28. package/types/native/SwiperAnimationFinishEvent.d.ts +11 -0
  29. package/types/native/SwiperChangeEvent.d.ts +11 -0
  30. package/types/native/SwiperTransitionEvent.d.ts +11 -0
  31. package/types/native/TextareaBlurEvent.d.ts +17 -0
  32. package/types/native/TextareaFocusEvent.d.ts +17 -0
  33. package/types/native/TextareaLineChangeEvent.d.ts +21 -0
  34. package/types/native/TouchEvent.d.ts +5 -1
  35. package/types/native/UniError.d.ts +7 -3
  36. package/types/native/index.d.ts +18 -3
  37. package/types/page.d.ts +57 -212
  38. package/types/uni/core/index.d.ts +9 -7
  39. package/types/uni/core/lib/base/event/interface.d.ts +4 -4
  40. package/types/uni/core/lib/lifecycle/interface.d.ts +1 -1
  41. package/types/uni/core/lib/performance/interface.d.ts +0 -20
  42. package/types/uni/core/lib/route/index.d.ts +0 -10
  43. package/types/uni/core/lib/route/interface.d.ts +1805 -10
  44. package/types/uni/core/lib/ui/create-selector-query/interface.d.ts +242 -2
  45. package/types/uni/core/lib/ui/get-element-by-id/index.d.ts +9 -0
  46. package/types/uni/core/lib/ui/get-element-by-id/interface.d.ts +72 -0
  47. package/types/uni/core/lib/ui/load-font-face/interface.d.ts +486 -3
  48. package/types/uni/core/lib/ui/page-scroll-to/index.d.ts +0 -2
  49. package/types/uni/core/lib/ui/page-scroll-to/interface.d.ts +93 -9
  50. package/types/uni/core/lib/ui/pull-down-refresh/index.d.ts +0 -2
  51. package/types/uni/core/lib/ui/pull-down-refresh/interface.d.ts +2 -5
  52. package/types/uni/core/lib/ui/set-navigation-bar-color/interface.d.ts +373 -4
  53. package/types/uni/core/lib/ui/tab-bar/index.d.ts +2 -18
  54. package/types/uni/core/lib/ui/tab-bar/interface.d.ts +32 -35
  55. package/types/uni/index.d.ts +2 -1
  56. package/types/uni/{ext → uts-plugin-api}/index.d.ts +18 -17
  57. package/types/uni/{ext → uts-plugin-api}/lib/uni-audio/utssdk/interface.d.ts +2 -2
  58. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/index.d.ts +11 -0
  59. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +98 -0
  60. package/types/uni/{ext → uts-plugin-api}/lib/uni-exit/utssdk/interface.d.ts +1 -1
  61. package/types/uni/{ext → uts-plugin-api}/lib/uni-file-manager/utssdk/interface.d.ts +4 -32
  62. package/types/uni/{ext → uts-plugin-api}/lib/uni-getAccessibilityInfo/utssdk/interface.d.ts +1 -1
  63. package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +108 -10
  64. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +233 -0
  65. package/types/uni/{ext → uts-plugin-api}/lib/uni-getDeviceInfo/utssdk/interface.d.ts +58 -46
  66. package/types/uni/{ext → uts-plugin-api}/lib/uni-getLocation-system/utssdk/index.d.ts +0 -2
  67. package/types/uni/{ext → uts-plugin-api}/lib/uni-getLocation-system/utssdk/interface.d.ts +14 -10
  68. package/types/uni/{ext → uts-plugin-api}/lib/uni-getNetworkType/utssdk/interface.d.ts +8 -5
  69. package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +213 -0
  70. package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemInfo/utssdk/interface.d.ts +108 -163
  71. package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemSetting/utssdk/interface.d.ts +3 -3
  72. package/types/uni/{ext → uts-plugin-api}/lib/uni-media/utssdk/index.d.ts +0 -20
  73. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +794 -0
  74. package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/app-ios/interface.d.ts +60 -19
  75. package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/index.d.ts +4 -0
  76. package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/interface.d.ts +138 -49
  77. package/types/uni/{ext → uts-plugin-api}/lib/uni-openAppAuthorizeSetting/utssdk/interface.d.ts +8 -5
  78. package/types/uni/{ext → uts-plugin-api}/lib/uni-prompt/utssdk/interface.d.ts +6 -6
  79. package/types/uni/{ext → uts-plugin-api}/lib/uni-storage/utssdk/index.d.ts +0 -10
  80. package/types/uni/{ext → uts-plugin-api}/lib/uni-storage/utssdk/interface.d.ts +33 -117
  81. package/types/uni/{ext → uts-plugin-api}/lib/uni-websocket/utssdk/index.d.ts +2 -0
  82. package/types/uni/{ext → uts-plugin-api}/lib/uni-websocket/utssdk/interface.d.ts +60 -35
  83. package/types/uni/uts-plugin-component/index.d.ts +1 -0
  84. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/index.d.ts +15 -0
  85. package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +171 -0
  86. package/types/uni-cloud/index.d.ts +59 -333
  87. package/types/uni-cloud/interface.d.ts +786 -0
  88. package/types/vue/CheckboxGroupChangeEvent.d.ts +1 -1
  89. package/types/vue/PickerViewChangeEvent.d.ts +1 -1
  90. package/types/vue/ProgressActiveendEvent.d.ts +1 -1
  91. package/types/vue/RadioGroupChangeEvent.d.ts +1 -1
  92. package/types/vue/SliderChangeEvent.d.ts +10 -1
  93. package/types/vue/SwitchChangeEvent.d.ts +1 -1
  94. package/uts-plugin.d.ts +10 -0
  95. package/.env +0 -3
  96. package/tsconfig.json +0 -5
  97. package/types/native/INode.d.ts +0 -181
  98. package/types/native/UTSError.d.ts +0 -15
  99. package/types/native/UTSPromise.d.ts +0 -74
  100. package/types/uni/ext/lib/uni-file-manager/utssdk/index.d.ts +0 -35
  101. package/types/uni/ext/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +0 -120
  102. package/types/uni/ext/lib/uni-getRecorderManager/utssdk/interface.d.ts +0 -213
  103. package/types/uni/ext/lib/uni-media/utssdk/interface.d.ts +0 -877
  104. /package/types/uni/{ext → uts-plugin-api}/lib/uni-audio/utssdk/index.d.ts +0 -0
  105. /package/types/uni/{ext → uts-plugin-api}/lib/uni-exit/utssdk/index.d.ts +0 -0
  106. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAccessibilityInfo/utssdk/index.d.ts +0 -0
  107. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppAuthorizeSetting/utssdk/index.d.ts +0 -0
  108. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getAppBaseInfo/utssdk/index.d.ts +0 -0
  109. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getDeviceInfo/utssdk/index.d.ts +0 -0
  110. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getNetworkType/utssdk/index.d.ts +0 -0
  111. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getRecorderManager/utssdk/index.d.ts +0 -0
  112. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemInfo/utssdk/index.d.ts +0 -0
  113. /package/types/uni/{ext → uts-plugin-api}/lib/uni-getSystemSetting/utssdk/index.d.ts +0 -0
  114. /package/types/uni/{ext → uts-plugin-api}/lib/uni-network/utssdk/app-ios/index.d.ts +0 -0
  115. /package/types/uni/{ext → uts-plugin-api}/lib/uni-openAppAuthorizeSetting/utssdk/index.d.ts +0 -0
  116. /package/types/uni/{ext → uts-plugin-api}/lib/uni-prompt/utssdk/index.d.ts +0 -0
package/types/page.d.ts CHANGED
@@ -131,31 +131,41 @@ interface ShareTimelineContent {
131
131
  imageUrl?: string;
132
132
  }
133
133
 
134
- interface PageScrollOption {
134
+ interface OnPageScrollOptions {
135
135
  /**
136
136
  * 页面在垂直方向已滚动的距离(单位 px)
137
137
  */
138
138
  scrollTop: number;
139
139
  }
140
140
 
141
- interface ResizeOption {
141
+ interface OnResizeSize {
142
142
  /**
143
- * 页面在垂直方向已滚动的距离(单位 px)
143
+ * 新的屏幕高度
144
144
  */
145
- scrollTop: number;
145
+ screenHeight: number
146
+ /**
147
+ * 新的屏幕宽度
148
+ */
149
+ screenWidth: number
150
+ /**
151
+ * 新的显示区域高度
152
+ */
153
+ windowHeight: number
154
+ /**
155
+ * 新的显示区域宽度
156
+ */
157
+ windowWidth: number
158
+ }
159
+
160
+ interface OnResizeOptions {
161
+ /**
162
+ * 屏幕方向
163
+ */
164
+ deviceOrientation: string
146
165
  /**
147
166
  * 新的显示区域尺寸
148
167
  */
149
- size?: {
150
- /**
151
- * 新的显示区域宽度
152
- */
153
- windowWidth: number;
154
- /**
155
- * 新的显示区域高度
156
- */
157
- windowHeight: number;
158
- };
168
+ size: OnResizeSize
159
169
  }
160
170
 
161
171
  interface ShareAppMessageOption {
@@ -227,7 +237,8 @@ interface NavigationBarButtonTapOption {
227
237
  index: number;
228
238
  }
229
239
 
230
- interface BackPressOption {
240
+ type OnLoadOptions = Map<string, string>
241
+ interface OnBackPressOptions {
231
242
  /**
232
243
  * - backbutton 顶部导航栏左边的返回按钮或 Android 实体返回键
233
244
  * - navigateBack 返回 API,即 uni.navigateBack()
@@ -264,7 +275,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
264
275
  * 页面初始化时触发。一个页面只会调用一次,可以在 onInit 的参数中获取打开当前页面路径中的参数。
265
276
  * @param query 打开当前页面路径中的参数
266
277
  *
267
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
278
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
268
279
  * @uniPlatform {
269
280
  * "app": {
270
281
  * "android": {
@@ -318,31 +329,22 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
318
329
  * "hostVer": "x",
319
330
  * "uniVer": "x",
320
331
  * "unixVer": "x"
321
- * },
322
- * "360": {
323
- * "hostVer": "x",
324
- * "uniVer": "x",
325
- * "unixVer": "x"
326
332
  * }
327
333
  * },
328
- * "quickapp": {
329
- * "uniVer": "x",
330
- * "unixVer": "x"
331
- * },
332
334
  * "web": {
333
335
  * "uniVer": "x",
334
336
  * "unixVer": "x"
335
337
  * }
336
338
  *}
337
339
  */
338
- onInit?(query?: Map<string, string>): void;
340
+ onInit?(query?: AnyObject): void;
339
341
  /**
340
342
  * 生命周期回调 监听页面加载
341
343
  *
342
344
  * 页面加载时触发。一个页面只会调用一次,可以在 onLoad 的参数中获取打开当前页面路径中的参数。
343
345
  * @param query 打开当前页面路径中的参数
344
346
  *
345
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
347
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
346
348
  * @uniPlatform {
347
349
  * "app": {
348
350
  * "android": {
@@ -396,30 +398,21 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
396
398
  * "hostVer": "√",
397
399
  * "uniVer": "√",
398
400
  * "unixVer": "x"
399
- * },
400
- * "360": {
401
- * "hostVer": "√",
402
- * "uniVer": "√",
403
- * "unixVer": "x"
404
401
  * }
405
402
  * },
406
- * "quickapp": {
407
- * "uniVer": "√",
408
- * "unixVer": "x"
409
- * },
410
403
  * "web": {
411
404
  * "uniVer": "√",
412
405
  * "unixVer": "x"
413
406
  * }
414
407
  *}
415
408
  */
416
- onLoad?(query?: Map<string, string>): void;
409
+ onLoad?(query?: OnLoadOptions): void;
417
410
  /**
418
411
  * 生命周期回调 监听页面显示
419
412
  *
420
413
  * 页面显示/切入前台时触发。
421
414
  *
422
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
415
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
423
416
  * @uniPlatform {
424
417
  * "app": {
425
418
  * "android": {
@@ -473,17 +466,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
473
466
  * "hostVer": "√",
474
467
  * "uniVer": "√",
475
468
  * "unixVer": "x"
476
- * },
477
- * "360": {
478
- * "hostVer": "√",
479
- * "uniVer": "√",
480
- * "unixVer": "x"
481
469
  * }
482
470
  * },
483
- * "quickapp": {
484
- * "uniVer": "√",
485
- * "unixVer": "x"
486
- * },
487
471
  * "web": {
488
472
  * "uniVer": "√",
489
473
  * "unixVer": "x"
@@ -496,7 +480,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
496
480
  *
497
481
  * 页面初次渲染完成时触发。一个页面只会调用一次,代表页面已经准备妥当,可以和视图层进行交互。
498
482
  *
499
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
483
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
500
484
  * @uniPlatform {
501
485
  * "app": {
502
486
  * "android": {
@@ -550,17 +534,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
550
534
  * "hostVer": "√",
551
535
  * "uniVer": "√",
552
536
  * "unixVer": "x"
553
- * },
554
- * "360": {
555
- * "hostVer": "√",
556
- * "uniVer": "√",
557
- * "unixVer": "x"
558
537
  * }
559
538
  * },
560
- * "quickapp": {
561
- * "uniVer": "√",
562
- * "unixVer": "x"
563
- * },
564
539
  * "web": {
565
540
  * "uniVer": "√",
566
541
  * "unixVer": "x"
@@ -573,7 +548,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
573
548
  *
574
549
  * 页面隐藏/切入后台时触发。 如 `navigateTo` 或底部 `tab` 切换到其他页面,应用切入后台等。
575
550
  *
576
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
551
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
577
552
  * @uniPlatform {
578
553
  * "app": {
579
554
  * "android": {
@@ -627,17 +602,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
627
602
  * "hostVer": "√",
628
603
  * "uniVer": "√",
629
604
  * "unixVer": "x"
630
- * },
631
- * "360": {
632
- * "hostVer": "√",
633
- * "uniVer": "√",
634
- * "unixVer": "x"
635
605
  * }
636
606
  * },
637
- * "quickapp": {
638
- * "uniVer": "√",
639
- * "unixVer": "x"
640
- * },
641
607
  * "web": {
642
608
  * "uniVer": "√",
643
609
  * "unixVer": "x"
@@ -650,7 +616,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
650
616
  *
651
617
  * 页面卸载时触发。如 `redirectTo` 或 `navigateBack` 到其他页面时。
652
618
  *
653
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
619
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
654
620
  * @uniPlatform {
655
621
  * "app": {
656
622
  * "android": {
@@ -704,17 +670,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
704
670
  * "hostVer": "√",
705
671
  * "uniVer": "√",
706
672
  * "unixVer": "x"
707
- * },
708
- * "360": {
709
- * "hostVer": "√",
710
- * "uniVer": "√",
711
- * "unixVer": "x"
712
673
  * }
713
674
  * },
714
- * "quickapp": {
715
- * "uniVer": "√",
716
- * "unixVer": "x"
717
- * },
718
675
  * "web": {
719
676
  * "uniVer": "√",
720
677
  * "unixVer": "x"
@@ -728,7 +685,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
728
685
  * - 可以通过 `uni.startPullDownRefresh` 触发下拉刷新,调用后触发下拉刷新动画,效果与用户手动下拉刷新一致。
729
686
  * - 当处理完数据刷新后,`uni.stopPullDownRefresh` 可以停止当前页面的下拉刷新。
730
687
  *
731
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
688
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
732
689
  * @uniPlatform {
733
690
  * "app": {
734
691
  * "android": {
@@ -782,17 +739,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
782
739
  * "hostVer": "√",
783
740
  * "uniVer": "√",
784
741
  * "unixVer": "x"
785
- * },
786
- * "360": {
787
- * "hostVer": "√",
788
- * "uniVer": "√",
789
- * "unixVer": "x"
790
742
  * }
791
743
  * },
792
- * "quickapp": {
793
- * "uniVer": "√",
794
- * "unixVer": "x"
795
- * },
796
744
  * "web": {
797
745
  * "uniVer": "√",
798
746
  * "unixVer": "x"
@@ -805,7 +753,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
805
753
  * - 可以在 `pages.json` 的页面配置中设置触发距离 `onReachBottomDistance` 。
806
754
  * - 在触发距离内滑动期间,本事件只会被触发一次。
807
755
  *
808
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
756
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
809
757
  * @uniPlatform {
810
758
  * "app": {
811
759
  * "android": {
@@ -859,17 +807,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
859
807
  * "hostVer": "√",
860
808
  * "uniVer": "√",
861
809
  * "unixVer": "x"
862
- * },
863
- * "360": {
864
- * "hostVer": "√",
865
- * "uniVer": "√",
866
- * "unixVer": "x"
867
810
  * }
868
811
  * },
869
- * "quickapp": {
870
- * "uniVer": "√",
871
- * "unixVer": "x"
872
- * },
873
812
  * "web": {
874
813
  * "uniVer": "√",
875
814
  * "unixVer": "x"
@@ -884,7 +823,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
884
823
  * @param options 分享发起来源参数
885
824
  * @return 转发内容
886
825
  *
887
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
826
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
888
827
  * @uniPlatform {
889
828
  * "app": {
890
829
  * "android": {
@@ -938,17 +877,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
938
877
  * "hostVer": "√",
939
878
  * "uniVer": "√",
940
879
  * "unixVer": "x"
941
- * },
942
- * "360": {
943
- * "hostVer": "x",
944
- * "uniVer": "x",
945
- * "unixVer": "x"
946
880
  * }
947
881
  * },
948
- * "quickapp": {
949
- * "uniVer": "x",
950
- * "unixVer": "x"
951
- * },
952
882
  * "web": {
953
883
  * "uniVer": "x",
954
884
  * "unixVer": "x"
@@ -961,7 +891,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
961
891
  *
962
892
  * 监听右上角菜单“分享到朋友圈”按钮的行为,并自定义发享内容。
963
893
  *
964
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
894
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
965
895
  * @uniPlatform {
966
896
  * "app": {
967
897
  * "android": {
@@ -1015,17 +945,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1015
945
  * "hostVer": "x",
1016
946
  * "uniVer": "x",
1017
947
  * "unixVer": "x"
1018
- * },
1019
- * "360": {
1020
- * "hostVer": "x",
1021
- * "uniVer": "x",
1022
- * "unixVer": "x"
1023
948
  * }
1024
949
  * },
1025
- * "quickapp": {
1026
- * "uniVer": "x",
1027
- * "unixVer": "x"
1028
- * },
1029
950
  * "web": {
1030
951
  * "uniVer": "x",
1031
952
  * "unixVer": "x"
@@ -1038,7 +959,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1038
959
  *
1039
960
  * 监听用户点击右上角菜单“收藏”按钮的行为,并自定义收藏内容。
1040
961
  *
1041
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
962
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1042
963
  * @uniPlatform {
1043
964
  * "app": {
1044
965
  * "android": {
@@ -1092,17 +1013,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1092
1013
  * "hostVer": "x",
1093
1014
  * "uniVer": "x",
1094
1015
  * "unixVer": "x"
1095
- * },
1096
- * "360": {
1097
- * "hostVer": "x",
1098
- * "uniVer": "x",
1099
- * "unixVer": "x"
1100
1016
  * }
1101
1017
  * },
1102
- * "quickapp": {
1103
- * "uniVer": "x",
1104
- * "unixVer": "x"
1105
- * },
1106
1018
  * "web": {
1107
1019
  * "uniVer": "x",
1108
1020
  * "unixVer": "x"
@@ -1116,7 +1028,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1116
1028
  * 监听用户滑动页面事件。
1117
1029
  * @param options 页面滚动参数
1118
1030
  *
1119
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1031
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1120
1032
  * @uniPlatform {
1121
1033
  * "app": {
1122
1034
  * "android": {
@@ -1170,17 +1082,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1170
1082
  * "hostVer": "√",
1171
1083
  * "uniVer": "√",
1172
1084
  * "unixVer": "x"
1173
- * },
1174
- * "360": {
1175
- * "hostVer": "√",
1176
- * "uniVer": "√",
1177
- * "unixVer": "x"
1178
1085
  * }
1179
1086
  * },
1180
- * "quickapp": {
1181
- * "uniVer": "√",
1182
- * "unixVer": "x"
1183
- * },
1184
1087
  * "web": {
1185
1088
  * "uniVer": "√",
1186
1089
  * "unixVer": "x"
@@ -1192,7 +1095,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1192
1095
  * 页面尺寸改变时触发
1193
1096
  * @param options 页面滚动参数
1194
1097
  *
1195
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1098
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1196
1099
  * @uniPlatform {
1197
1100
  * "app": {
1198
1101
  * "android": {
@@ -1246,17 +1149,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1246
1149
  * "hostVer": "x",
1247
1150
  * "uniVer": "x",
1248
1151
  * "unixVer": "x"
1249
- * },
1250
- * "360": {
1251
- * "hostVer": "x",
1252
- * "uniVer": "x",
1253
- * "unixVer": "x"
1254
1152
  * }
1255
1153
  * },
1256
- * "quickapp": {
1257
- * "uniVer": "x",
1258
- * "unixVer": "x"
1259
- * },
1260
1154
  * "web": {
1261
1155
  * "uniVer": "x",
1262
1156
  * "unixVer": "x"
@@ -1268,7 +1162,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1268
1162
  * 当前是 tab 页时,点击 tab 时触发
1269
1163
  * @param options tab 点击参数
1270
1164
  *
1271
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1165
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1272
1166
  * @uniPlatform {
1273
1167
  * "app": {
1274
1168
  * "android": {
@@ -1322,17 +1216,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1322
1216
  * "hostVer": "√",
1323
1217
  * "uniVer": "√",
1324
1218
  * "unixVer": "x"
1325
- * },
1326
- * "360": {
1327
- * "hostVer": "x",
1328
- * "uniVer": "x",
1329
- * "unixVer": "x"
1330
1219
  * }
1331
1220
  * },
1332
- * "quickapp": {
1333
- * "uniVer": "x",
1334
- * "unixVer": "x"
1335
- * },
1336
1221
  * "web": {
1337
1222
  * "uniVer": "√",
1338
1223
  * "unixVer": "x"
@@ -1344,7 +1229,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1344
1229
  * 监听原生标题栏按钮点击事件
1345
1230
  * @param options tab 点击参数
1346
1231
  *
1347
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1232
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1348
1233
  * @uniPlatform {
1349
1234
  * "app": {
1350
1235
  * "android": {
@@ -1398,17 +1283,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1398
1283
  * "hostVer": "x",
1399
1284
  * "uniVer": "x",
1400
1285
  * "unixVer": "x"
1401
- * },
1402
- * "360": {
1403
- * "hostVer": "x",
1404
- * "uniVer": "x",
1405
- * "unixVer": "x"
1406
1286
  * }
1407
1287
  * },
1408
- * "quickapp": {
1409
- * "uniVer": "x",
1410
- * "unixVer": "x"
1411
- * },
1412
1288
  * "web": {
1413
1289
  * "uniVer": "√",
1414
1290
  * "unixVer": "x"
@@ -1421,7 +1297,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1421
1297
  * @param options tab 点击参数
1422
1298
  * @return 返回 `true` 时阻止页面返回
1423
1299
  *
1424
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1300
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1425
1301
  * @uniPlatform {
1426
1302
  * "app": {
1427
1303
  * "android": {
@@ -1475,28 +1351,19 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1475
1351
  * "hostVer": "x",
1476
1352
  * "uniVer": "x",
1477
1353
  * "unixVer": "x"
1478
- * },
1479
- * "360": {
1480
- * "hostVer": "x",
1481
- * "uniVer": "x",
1482
- * "unixVer": "x"
1483
1354
  * }
1484
1355
  * },
1485
- * "quickapp": {
1486
- * "uniVer": "x",
1487
- * "unixVer": "x"
1488
- * },
1489
1356
  * "web": {
1490
1357
  * "uniVer": "√",
1491
1358
  * "unixVer": "x"
1492
1359
  * }
1493
1360
  *}
1494
1361
  */
1495
- onBackPress?(options: BackPressOption): any;
1362
+ onBackPress?(options: OnBackPressOptions): any;
1496
1363
  /**
1497
1364
  * 监听原生标题栏搜索输入框输入内容变化事件
1498
1365
  *
1499
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1366
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1500
1367
  * @uniPlatform {
1501
1368
  * "app": {
1502
1369
  * "android": {
@@ -1550,17 +1417,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1550
1417
  * "hostVer": "x",
1551
1418
  * "uniVer": "x",
1552
1419
  * "unixVer": "x"
1553
- * },
1554
- * "360": {
1555
- * "hostVer": "x",
1556
- * "uniVer": "x",
1557
- * "unixVer": "x"
1558
1420
  * }
1559
1421
  * },
1560
- * "quickapp": {
1561
- * "uniVer": "x",
1562
- * "unixVer": "x"
1563
- * },
1564
1422
  * "web": {
1565
1423
  * "uniVer": "√",
1566
1424
  * "unixVer": "x"
@@ -1571,7 +1429,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1571
1429
  /**
1572
1430
  * 监听原生标题栏搜索输入框搜索事件,用户点击软键盘上的“搜索”按钮时触发。
1573
1431
  *
1574
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1432
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1575
1433
  * @uniPlatform {
1576
1434
  * "app": {
1577
1435
  * "android": {
@@ -1625,17 +1483,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1625
1483
  * "hostVer": "x",
1626
1484
  * "uniVer": "x",
1627
1485
  * "unixVer": "x"
1628
- * },
1629
- * "360": {
1630
- * "hostVer": "x",
1631
- * "uniVer": "x",
1632
- * "unixVer": "x"
1633
1486
  * }
1634
1487
  * },
1635
- * "quickapp": {
1636
- * "uniVer": "x",
1637
- * "unixVer": "x"
1638
- * },
1639
1488
  * "web": {
1640
1489
  * "uniVer": "√",
1641
1490
  * "unixVer": "x"
@@ -1646,7 +1495,7 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1646
1495
  /**
1647
1496
  * 监听原生标题栏搜索输入框点击事件
1648
1497
  *
1649
- * 文档: [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1498
+ * @tutorial [https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle](https://uniapp.dcloud.net.cn/tutorial/page.html#lifecycle)
1650
1499
  * @uniPlatform {
1651
1500
  * "app": {
1652
1501
  * "android": {
@@ -1700,17 +1549,8 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1700
1549
  * "hostVer": "x",
1701
1550
  * "uniVer": "x",
1702
1551
  * "unixVer": "x"
1703
- * },
1704
- * "360": {
1705
- * "hostVer": "x",
1706
- * "uniVer": "x",
1707
- * "unixVer": "x"
1708
1552
  * }
1709
1553
  * },
1710
- * "quickapp": {
1711
- * "uniVer": "x",
1712
- * "unixVer": "x"
1713
- * },
1714
1554
  * "web": {
1715
1555
  * "uniVer": "√",
1716
1556
  * "unixVer": "x"
@@ -1720,10 +1560,15 @@ interface PageInstance<D extends AnyObject = any, T extends AnyObject = any> ext
1720
1560
  onNavigationBarSearchInputClicked?(): void;
1721
1561
  }
1722
1562
 
1723
- type PageConstructor = <T extends AnyObject & PageInstance>(
1724
- options: PageInstance<AnyObject, T> & T,
1725
- ) => void;
1563
+ interface BasePage {
1564
+ route: string
1565
+ options: Map<string, string | null>
1566
+ }
1726
1567
 
1727
- type GetCurrentPages = <T extends AnyObject = {}>() => Array<PageInstance<AnyObject, T> & T>;
1568
+ /**
1569
+ * `getCurrentPages()` 函数用于获取当前页面栈的实例,以数组形式按栈的顺序给出,数组中的元素为页面实例,第一个元素为首页,最后一个元素为当前页面。
1570
+ * @tutorial https://uniapp.dcloud.net.cn/tutorial/page.html#getcurrentpages
1571
+ */
1572
+ type GetCurrentPages = () => BasePage[]
1728
1573
 
1729
1574
  declare const getCurrentPages: GetCurrentPages;
@@ -1,9 +1,11 @@
1
- /// <reference path='./lib/base/event/index.d.ts' />
2
- /// <reference path='./lib/lifecycle/index.d.ts' />
3
1
  /// <reference path='./lib/route/index.d.ts' />
4
- /// <reference path='./lib/ui/create-selector-query/index.d.ts' />
5
- /// <reference path='./lib/ui/load-font-face/index.d.ts' />
6
- /// <reference path='./lib/ui/page-scroll-to/index.d.ts' />
7
- /// <reference path='./lib/ui/pull-down-refresh/index.d.ts' />
8
- /// <reference path='./lib/ui/set-navigation-bar-color/index.d.ts' />
2
+ /// <reference path='./lib/performance/index.d.ts' />
3
+ /// <reference path='./lib/lifecycle/index.d.ts' />
9
4
  /// <reference path='./lib/ui/tab-bar/index.d.ts' />
5
+ /// <reference path='./lib/ui/set-navigation-bar-color/index.d.ts' />
6
+ /// <reference path='./lib/ui/pull-down-refresh/index.d.ts' />
7
+ /// <reference path='./lib/ui/page-scroll-to/index.d.ts' />
8
+ /// <reference path='./lib/ui/load-font-face/index.d.ts' />
9
+ /// <reference path='./lib/ui/get-element-by-id/index.d.ts' />
10
+ /// <reference path='./lib/ui/create-selector-query/index.d.ts' />
11
+ /// <reference path='./lib/base/event/index.d.ts' />
@@ -18,23 +18,23 @@ export interface Uni {
18
18
  *
19
19
  * @tutorial http://uniapp.dcloud.io/api/window/communication?id=on
20
20
  */
21
- $on: $On
21
+ $on(eventName: string, callback: $OnCallback): void
22
22
  /**
23
23
  * 移除自定义事件监听器。如果没有指定事件名,则移除所有事件监听器。如果提供事件名,则移除该事件的所有监听器。如果提供了事件名和回调,则只移除这个回调的监听器。
24
24
  *
25
25
  * @tutorial http://uniapp.dcloud.io/api/window/communication?id=off
26
26
  */
27
- $off: $Off
27
+ $off(eventName: string, callback: $OffCallback): void
28
28
  /**
29
29
  * 监听一个自定义事件。事件只触发一次,在第一次触发之后移除事件监听器。
30
30
  *
31
31
  * @tutorial http://uniapp.dcloud.io/api/window/communication?id=once
32
32
  */
33
- $once: $Once
33
+ $once(eventName: string, callback: $OnceCallback): void
34
34
  /**
35
35
  * 触发自定义事件,附加的参数会传递给事件监听器。
36
36
  *
37
37
  * @tutorial http://uniapp.dcloud.io/api/window/communication?id=emit
38
38
  */
39
- $emit: $Emit
39
+ $emit(eventName: string, args: any | null): void
40
40
  }
@@ -8,5 +8,5 @@ export interface Uni {
8
8
  *
9
9
  * @tutorial http://uniapp.dcloud.io/api/plugins/getLaunchOptionsSync
10
10
  */
11
- getLaunchOptionsSync: GetLaunchOptionsSync
11
+ getLaunchOptionsSync(): OnLaunchOptions
12
12
  }