@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
package/.prettierrc ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "semi": false,
3
+ "singleQuote": false,
4
+ "printWidth": 160
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-app-x",
3
- "version": "0.7.10",
3
+ "version": "0.7.12",
4
4
  "description": "uni-app x types",
5
5
  "typings": "index.d.ts",
6
6
  "author": "DCloud",
@@ -14,7 +14,7 @@
14
14
  "build:types:plugin": "npm run build:types:plugin:api && npm run build:types:plugin:component && npm run build:types:plugin:biz",
15
15
  "build:types:meta": "node ./scripts/build-meta.js",
16
16
  "build:types:native": "node ./scripts/build-native.js",
17
- "build:types": "npm run build:types:native && npm run build:types:core && npm run build:types:plugin"
17
+ "build:types": "npm run build:types:native && npm run build:types:plugin"
18
18
  },
19
19
  "devDependencies": {
20
20
  "delete": "^1.1.0",
@@ -1,9 +1,9 @@
1
1
  import { DrawableContext } from "./DrawableContext"
2
2
  import { TakeSnapshotOptions } from "./SnapshotOptions"
3
- import { UniEvent } from './UniEvent'
3
+ import { UniEvent } from "./UniEvent"
4
4
  import { CSSStyleDeclaration } from "./CSSStyleDeclaration"
5
5
  import { DOMRect } from "./DOMRect"
6
- import { UniCallbackWrapper } from "./UniCallbackWrapper";
6
+ import { UniCallbackWrapper } from "./UniCallbackWrapper"
7
7
 
8
8
  /**
9
9
  * UVUE DOM 元素对象,描述了 UVUE DOM 元素所普通具有的属性和方法。
@@ -99,8 +99,8 @@ export interface UniElement {
99
99
  readonly scrollHeight: number
100
100
 
101
101
  /**
102
- * 获取或修改元素滚动条到元素左边的距离像素数,仅scroll-view、list-view组件支持。其他组件返回0
103
- */
102
+ * 获取或修改元素滚动条到元素左边的距离像素数,仅scroll-view、list-view组件支持。其他组件返回0
103
+ */
104
104
  scrollLeft: number
105
105
 
106
106
  /**
@@ -139,7 +139,6 @@ export interface UniElement {
139
139
  */
140
140
  getNodeId(): string
141
141
 
142
-
143
142
  /**
144
143
  * 对当前组件进行截图,调用此方法会将当前组件(包含子节点)渲染结果导出成图片。
145
144
  * 成功会返回图片对应的临时文件路径,目前默认png格式
@@ -153,9 +152,9 @@ export interface UniElement {
153
152
  * "unixVer": "3.93"
154
153
  * },
155
154
  * "ios": {
156
- * "osVer": "x",
155
+ * "osVer": "12.0",
157
156
  * "uniVer": "x",
158
- * "unixVer": "x"
157
+ * "unixVer": "4.11"
159
158
  * }
160
159
  * }
161
160
  * "web": {
@@ -335,50 +334,43 @@ export type Element = UniElement
335
334
  * view元素对象
336
335
  * @package io.dcloud.uniapp.runtime
337
336
  */
338
- export interface UniViewElement extends UniElement {
339
- }
337
+ export interface UniViewElement extends UniElement {}
340
338
 
341
339
  /**
342
340
  * scroll-view元素对象
343
341
  * @package io.dcloud.uniapp.runtime
344
342
  */
345
- export interface UniScrollViewElement extends UniElement {
346
- }
343
+ export interface UniScrollViewElement extends UniElement {}
347
344
 
348
345
  /**
349
346
  * list-view元素对象
350
347
  * @package io.dcloud.uniapp.runtime
351
348
  */
352
- export interface UniListViewElement extends UniScrollViewElement {
353
- }
349
+ export interface UniListViewElement extends UniScrollViewElement {}
354
350
 
355
351
  /**
356
352
  * list-item元素对象
357
353
  * @package io.dcloud.uniapp.runtime
358
354
  */
359
- export interface UniListItemElement extends UniElement {
360
- }
355
+ export interface UniListItemElement extends UniElement {}
361
356
 
362
357
  /**
363
358
  * swiper元素对象
364
359
  * @package io.dcloud.uniapp.runtime
365
360
  */
366
- export interface UniSwiperElement extends UniElement {
367
- }
361
+ export interface UniSwiperElement extends UniElement {}
368
362
 
369
363
  /**
370
364
  * swiper-item元素对象
371
365
  * @package io.dcloud.uniapp.runtime
372
366
  */
373
- export interface UniSwiperItemElement extends UniElement {
374
- }
367
+ export interface UniSwiperItemElement extends UniElement {}
375
368
 
376
369
  /**
377
370
  * image元素对象
378
371
  * @package io.dcloud.uniapp.runtime
379
372
  */
380
- export interface UniImageElement extends UniElement {
381
- }
373
+ export interface UniImageElement extends UniElement {}
382
374
 
383
375
  /**
384
376
  * input元素对象
@@ -403,7 +395,7 @@ export interface UniInputElement extends UniElement {
403
395
  * }
404
396
  * }
405
397
  */
406
- name: string;
398
+ name: string
407
399
  /**
408
400
  * input的类型
409
401
  *
@@ -422,7 +414,7 @@ export interface UniInputElement extends UniElement {
422
414
  * }
423
415
  * }
424
416
  */
425
- type: string;
417
+ type: string
426
418
  /**
427
419
  * 是否禁用
428
420
  *
@@ -441,7 +433,7 @@ export interface UniInputElement extends UniElement {
441
433
  * }
442
434
  * }
443
435
  */
444
- disabled: boolean;
436
+ disabled: boolean
445
437
  /**
446
438
  * 自动获取焦点
447
439
  *
@@ -460,7 +452,7 @@ export interface UniInputElement extends UniElement {
460
452
  * }
461
453
  * }
462
454
  */
463
- autofocus: boolean;
455
+ autofocus: boolean
464
456
  /**
465
457
  * 输入框的初始内容
466
458
  *
@@ -479,7 +471,7 @@ export interface UniInputElement extends UniElement {
479
471
  * }
480
472
  * }
481
473
  */
482
- value: string;
474
+ value: string
483
475
  }
484
476
 
485
477
  /**
@@ -505,7 +497,7 @@ export interface UniTextareaElement extends UniElement {
505
497
  * }
506
498
  * }
507
499
  */
508
- name: string;
500
+ name: string
509
501
  /**
510
502
  * input的类型
511
503
  *
@@ -524,7 +516,7 @@ export interface UniTextareaElement extends UniElement {
524
516
  * }
525
517
  * }
526
518
  */
527
- type: string;
519
+ type: string
528
520
  /**
529
521
  * 是否禁用
530
522
  *
@@ -543,7 +535,7 @@ export interface UniTextareaElement extends UniElement {
543
535
  * }
544
536
  * }
545
537
  */
546
- disabled: boolean;
538
+ disabled: boolean
547
539
  /**
548
540
  * 自动获取焦点
549
541
  *
@@ -562,7 +554,7 @@ export interface UniTextareaElement extends UniElement {
562
554
  * }
563
555
  * }
564
556
  */
565
- autofocus: boolean;
557
+ autofocus: boolean
566
558
  /**
567
559
  * 输入框的初始内容
568
560
  *
@@ -581,31 +573,26 @@ export interface UniTextareaElement extends UniElement {
581
573
  * }
582
574
  * }
583
575
  */
584
- value: string;
576
+ value: string
585
577
  }
586
578
 
587
579
  /**
588
580
  * rich-text元素对象
589
581
  * @package io.dcloud.uniapp.runtime
590
582
  */
591
- export interface UniRichTextElement extends UniElement {
592
- }
583
+ export interface UniRichTextElement extends UniElement {}
593
584
 
594
585
  /**
595
586
  * sticky-header元素对象
596
587
  * @package io.dcloud.uniapp.runtime
597
588
  */
598
- export interface UniStickyHeaderElement extends UniElement {
599
- }
600
-
589
+ export interface UniStickyHeaderElement extends UniElement {}
601
590
 
602
591
  /**
603
592
  * sticky-section元素对象
604
593
  * @package io.dcloud.uniapp.runtime
605
594
  */
606
- export interface UniStickySectionElement extends UniElement {
607
- }
608
-
595
+ export interface UniStickySectionElement extends UniElement {}
609
596
 
610
597
  /**
611
598
  * tabs元素对象
@@ -687,7 +674,7 @@ export interface UniTabsElement extends UniElement {
687
674
  /**
688
675
  * 获取tabbar高度
689
676
  */
690
- getTabBarHeight():number
677
+ getTabBarHeight(): number
691
678
 
692
679
  /**
693
680
  * 只读属性 tabBar是否隐藏
@@ -758,20 +745,16 @@ export type IComment = UniCommentElement
758
745
  * button元素对象
759
746
  * @package io.dcloud.uniapp.runtime
760
747
  */
761
- interface UniButtonElement extends UniElement {
762
- }
763
-
748
+ interface UniButtonElement extends UniElement {}
764
749
 
765
750
  /**
766
751
  * 嵌套 scroll-view 场景中属于外层 scroll-view 的节点
767
752
  * @package io.dcloud.uniapp.runtime
768
753
  */
769
- export interface UniNestedScrollHeaderElement extends UniElement {
770
- }
754
+ export interface UniNestedScrollHeaderElement extends UniElement {}
771
755
 
772
756
  /**
773
757
  * 嵌套 scroll-view 场景中属于里层 scroll-view 的节点
774
758
  * @package io.dcloud.uniapp.runtime
775
759
  */
776
- export interface UniNestedScrollBodyElement extends UniElement {
777
- }
760
+ export interface UniNestedScrollBodyElement extends UniElement {}
@@ -1,5 +1,5 @@
1
1
  import { UniPageManager } from "./UniPageManager"
2
- import { UniCallbackWrapper } from "./UniCallbackWrapper";
2
+ import { UniCallbackWrapper } from "./UniCallbackWrapper"
3
3
  import { NativeLoadFontFaceOptions } from "./NativeLoadFontFaceOptions"
4
4
  import { UniKeyEvent } from "./UniEvent"
5
5
 
@@ -24,11 +24,10 @@ export interface UniApp {
24
24
  */
25
25
  onEvent(event: string): void
26
26
 
27
-
28
27
  /**
29
28
  * 监听app事件
30
29
  */
31
- addEventListener<T>(event: 'onShow' | 'onHide' | 'onExit', callback: (event: T) => void): UniCallbackWrapper
30
+ addEventListener<T>(event: "onShow" | "onHide" | "onExit", callback: (event: T) => void): UniCallbackWrapper
32
31
 
33
32
  /**
34
33
  * 注销app监听
@@ -38,10 +37,24 @@ export interface UniApp {
38
37
  /**
39
38
  * 监听app按键监听
40
39
  */
41
- addKeyEventListener(event: 'onBackButton', callback: (event: UniKeyEvent) => boolean): void
40
+ addKeyEventListener(event: "onBackButton", callback: (event: UniKeyEvent) => boolean): void
42
41
 
43
42
  /**
44
43
  * 退出app
44
+ * @uniPlatform {
45
+ * "app": {
46
+ * "android": {
47
+ * "osVer": "5.0",
48
+ * "uniVer": "x",
49
+ * "unixVer": "4.0"
50
+ * },
51
+ * "ios": {
52
+ * "osVer": "x",
53
+ * "uniVer": "x",
54
+ * "unixVer": "x"
55
+ * }
56
+ * }
57
+ * }
45
58
  */
46
59
  quit(): void
47
60
 
@@ -1,5 +1,5 @@
1
- import { INodeData } from "./NodeData";
2
- import { UniElement, UniCommentElement } from "./IUniElement";
1
+ import { INodeData } from "./NodeData"
2
+ import { UniElement, UniCommentElement } from "./IUniElement"
3
3
 
4
4
  /**
5
5
  * @package io.dcloud.uniapp.runtime
@@ -12,7 +12,7 @@ export interface UniDocument extends UniElement {
12
12
 
13
13
  startRender(): void
14
14
 
15
- startRender(callback: (()=>void) | null): void
15
+ startRender(callback: (() => void) | null): void
16
16
 
17
17
  createElement(tagName: string): UniElement
18
18
 
@@ -20,15 +20,63 @@ export interface UniDocument extends UniElement {
20
20
 
21
21
  createComment(data: string): UniCommentElement
22
22
 
23
+ /**
24
+ * @uniPlatform {
25
+ * "app": {
26
+ * "android": {
27
+ * "osVer": "5.0",
28
+ * "uniVer": "x",
29
+ * "unixVer": "4.0"
30
+ * },
31
+ * "ios": {
32
+ * "osVer": "x",
33
+ * "uniVer": "x",
34
+ * "unixVer": "x"
35
+ * }
36
+ * }
37
+ * }
38
+ */
23
39
  notifyLayout(): void
24
40
 
25
- runAsyncDomTask(fn: () => (any | null), callback: (value: any | null) => void): void
41
+ /**
42
+ * @uniPlatform {
43
+ * "app": {
44
+ * "android": {
45
+ * "osVer": "5.0",
46
+ * "uniVer": "x",
47
+ * "unixVer": "4.0"
48
+ * },
49
+ * "ios": {
50
+ * "osVer": "x",
51
+ * "uniVer": "x",
52
+ * "unixVer": "x"
53
+ * }
54
+ * }
55
+ * }
56
+ */
57
+ runAsyncDomTask(fn: () => any | null, callback: (value: any | null) => void): void
26
58
 
27
59
  /**
28
60
  * 页面排版完毕回调callback
29
61
  */
30
62
  waitNativeRender(callback: () => void): void
31
63
 
64
+ /**
65
+ * @uniPlatform {
66
+ * "app": {
67
+ * "android": {
68
+ * "osVer": "5.0",
69
+ * "uniVer": "x",
70
+ * "unixVer": "4.0"
71
+ * },
72
+ * "ios": {
73
+ * "osVer": "x",
74
+ * "uniVer": "x",
75
+ * "unixVer": "x"
76
+ * }
77
+ * }
78
+ * }
79
+ */
32
80
  getElementById(id: string): UniElement | null
33
81
  }
34
82
 
@@ -1,11 +1,10 @@
1
- import { UniDocument } from './UniDocument'
2
- import { INodeData } from './NodeData'
3
- import { UniPageEvent } from './UniPageEvent'
4
- import { UniPageScrollEvent } from './UniPageScrollEvent'
5
- import { NativeLoadFontFaceOptions } from './NativeLoadFontFaceOptions'
6
- import { UniCallbackWrapper } from './UniCallbackWrapper'
7
- import { ViewToTempFilePathOptions } from './ViewToTempFilePathOptions'
8
- import { StartPullDownRefreshOptions } from '../uni/core/lib/ui/pull-down-refresh/interface'
1
+ import { UniDocument } from "./UniDocument"
2
+ import { INodeData } from "./NodeData"
3
+ import { UniPageEvent } from "./UniPageEvent"
4
+ import { UniPageScrollEvent } from "./UniPageScrollEvent"
5
+ import { NativeLoadFontFaceOptions } from "./NativeLoadFontFaceOptions"
6
+ import { UniCallbackWrapper } from "./UniCallbackWrapper"
7
+ import { ViewToTempFilePathOptions } from "./ViewToTempFilePathOptions"
9
8
 
10
9
  /**
11
10
  * @package io.dcloud.uniapp.runtime
@@ -38,10 +37,7 @@ export interface UniNativePage {
38
37
  * @param callback 显示完毕监听器
39
38
  * @internal
40
39
  */
41
- show(
42
- options?: Map<String, any | null> | null,
43
- callback?: (() => void) | null
44
- ): void
40
+ show(options?: Map<String, any | null> | null, callback?: (() => void) | null): void
45
41
  /**
46
42
  * @internal
47
43
  */
@@ -53,10 +49,7 @@ export interface UniNativePage {
53
49
  * @param callback 关闭完毕监听器
54
50
  * @internal
55
51
  */
56
- close(
57
- options?: Map<String, any | null> | null,
58
- callback?: (() => void) | null
59
- ): void
52
+ close(options?: Map<String, any | null> | null, callback?: (() => void) | null): void
60
53
  /**
61
54
  * @internal
62
55
  */
@@ -73,25 +66,37 @@ export interface UniNativePage {
73
66
  */
74
67
  addPageEventListener(
75
68
  type:
76
- | 'onReady'
77
- | 'onShow'
78
- | 'onHide'
79
- | 'onTabItemTap'
80
- | 'onUnload'
81
- | 'onReachBottom'
82
- | 'onPullDownRefresh'
83
- | 'onPageScroll'
84
- | 'onResize'
85
- | 'onWebViewServiceMessage'
86
- | 'onPopGesture',
69
+ | "onReady"
70
+ | "onShow"
71
+ | "onHide"
72
+ | "onTabItemTap"
73
+ | "onUnload"
74
+ | "onReachBottom"
75
+ | "onPullDownRefresh"
76
+ | "onPageScroll"
77
+ | "onResize"
78
+ | "onWebViewServiceMessage"
79
+ | "onPopGesture",
87
80
  callback: (event: UniPageEvent) => void
88
81
  ): UniCallbackWrapper
89
82
  /**
90
83
  * 监听页面onPageScroll事件
91
- */
92
- addPageScrollEventListener(
93
- callback: (event: UniPageScrollEvent) => void
94
- ): UniCallbackWrapper
84
+ * @uniPlatform {
85
+ * "app": {
86
+ * "android": {
87
+ * "osVer": "5.0",
88
+ * "uniVer": "x",
89
+ * "unixVer": "4.0"
90
+ * },
91
+ * "ios": {
92
+ * "osVer": "x",
93
+ * "uniVer": "x",
94
+ * "unixVer": "x"
95
+ * }
96
+ * }
97
+ * }
98
+ */
99
+ addPageScrollEventListener(callback: (event: UniPageScrollEvent) => void): UniCallbackWrapper
95
100
 
96
101
  /**
97
102
  * @internal
@@ -106,11 +111,17 @@ export interface UniNativePage {
106
111
  * 开始页面下拉刷新
107
112
  */
108
113
  startPullDownRefresh(): void
114
+ /**
115
+ * 设置当前页面是否开启下拉刷新
116
+ * @param enable 是否开启下拉刷新
117
+ * @internal
118
+ */
119
+ setEnablePullDownRefresh(enable: boolean): void
109
120
  /**
110
121
  * 仅 iOS 支持 options 参数
111
122
  * @internal
112
123
  */
113
- startPullDownRefresh(options: StartPullDownRefreshOptions): void
124
+ startPullDownRefresh(options: { success: (res: any) => void; fail: (res: any) => void }): void
114
125
  /**
115
126
  * 停止当前页面下拉刷新
116
127
  */
@@ -148,6 +159,22 @@ export interface UniNativePage {
148
159
  */
149
160
  getFirstPageLayoutDuration(): number
150
161
 
162
+ /**
163
+ * @uniPlatform {
164
+ * "app": {
165
+ * "android": {
166
+ * "osVer": "5.0",
167
+ * "uniVer": "x",
168
+ * "unixVer": "4.0"
169
+ * },
170
+ * "ios": {
171
+ * "osVer": "x",
172
+ * "uniVer": "x",
173
+ * "unixVer": "x"
174
+ * }
175
+ * }
176
+ * }
177
+ */
151
178
  getAndroidActivity(): Activity | null
152
179
  }
153
180
  export type UniPage = UniNativePage
@@ -1,46 +1,45 @@
1
- import { UniEvent } from './UniEvent'
2
-
3
- /**
4
- * @package io.dcloud.uniapp.runtime
5
- */
6
- export class UniNestedPreScrollEvent extends UniEvent {
7
- /**
8
- * x轴滚动距离
9
- */
10
- deltaX: number
11
-
12
- /**
13
- * y轴滚动距离
14
- */
15
- deltaY: number
16
-
17
- /**
18
- * 是否由触摸行为发生的Event
19
- * @uniPlatform {
20
- * "app": {
21
- * "android": {
22
- * "osVer": "5.0",
23
- * "uniVer": "x",
24
- * "unixVer": "3.99"
25
- * },
26
- * "ios": {
27
- * "osVer": "x",
28
- * "uniVer": "x",
29
- * "unixVer": "x"
30
- * }
31
- * }
32
- * }
33
- */
34
- isTouch: boolean
35
-
36
- /**
37
- * 通知到子节点x,y轴滚动距离的消耗
38
- * @param {number} consumedX x轴消耗的滚动距离
39
- * @param {number} consumedY y轴消耗的滚动距离
40
- */
41
- consumed(consumedX: number, consumedY: number): void
42
- }
43
-
44
-
45
- export type NestedPreScrollEvent = UniNestedPreScrollEvent
46
- export const NestedPreScrollEvent: typeof UniNestedPreScrollEvent
1
+ import { UniEvent } from "./UniEvent"
2
+
3
+ /**
4
+ * @package io.dcloud.uniapp.runtime
5
+ */
6
+ export class UniNestedPreScrollEvent extends UniEvent {
7
+ /**
8
+ * x轴滚动距离
9
+ */
10
+ deltaX: number
11
+
12
+ /**
13
+ * y轴滚动距离
14
+ */
15
+ deltaY: number
16
+
17
+ /**
18
+ * 是否由触摸行为发生的Event
19
+ * @uniPlatform {
20
+ * "app": {
21
+ * "android": {
22
+ * "osVer": "5.0",
23
+ * "uniVer": "x",
24
+ * "unixVer": "3.99"
25
+ * },
26
+ * "ios": {
27
+ * "osVer": "x",
28
+ * "uniVer": "x",
29
+ * "unixVer": "x"
30
+ * }
31
+ * }
32
+ * }
33
+ */
34
+ isTouch: boolean
35
+
36
+ /**
37
+ * 通知到子节点x,y轴滚动距离的消耗
38
+ * @param {number} consumedX x轴消耗的滚动距离
39
+ * @param {number} consumedY y轴消耗的滚动距离
40
+ */
41
+ consumed(consumedX: number, consumedY: number): void
42
+ }
43
+
44
+ export type NestedPreScrollEvent = UniNestedPreScrollEvent
45
+ export const NestedPreScrollEvent: typeof UniNestedPreScrollEvent