@dcloudio/uni-app-x 0.7.13 → 0.7.14

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 (124) hide show
  1. package/package.json +1 -1
  2. package/types/app.d.ts +5 -6
  3. package/types/index.d.ts +1 -1
  4. package/types/native/CSSStyleDeclaration.d.ts +72 -0
  5. package/types/native/DOMRect.d.ts +180 -0
  6. package/types/native/DrawableContext.d.ts +628 -161
  7. package/types/native/IUniElement.d.ts +1834 -222
  8. package/types/native/SnapshotOptions.d.ts +0 -1
  9. package/types/native/UniApp.d.ts +17 -1
  10. package/types/native/UniEvent.d.ts +30 -0
  11. package/types/native/UniNativePage.d.ts +4 -0
  12. package/types/native/UniProvider.d.ts +14 -0
  13. package/types/native/UniResizeObserver.d.ts +92 -2
  14. package/types/native/UniSwiperAnimationFinishEvent.d.ts +24 -2
  15. package/types/native/UniSwiperChangeEvent.d.ts +24 -2
  16. package/types/native/UniSwiperTransitionEvent.d.ts +2 -2
  17. package/types/native/UniWebViewErrorEvent.d.ts +3 -3
  18. package/types/native/UniWebViewLoadEvent.d.ts +2 -2
  19. package/types/native/UniWebViewLoadingEvent.d.ts +2 -2
  20. package/types/native/UniWebViewMessageEvent.d.ts +1 -1
  21. package/types/native/global.d.ts +19 -9
  22. package/types/native/index.d.ts +1 -0
  23. package/types/page.d.ts +85 -0
  24. package/types/uni/global.d.ts +1 -0
  25. package/types/uni/index.d.ts +2 -1
  26. package/types/uni/uts-plugin-api/global.d.ts +2 -1
  27. package/types/uni/uts-plugin-api/index.d.ts +2 -1
  28. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +2 -2
  29. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +6 -2
  30. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/global.d.ts +6 -0
  31. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/index.d.ts +3 -0
  32. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +56 -7
  33. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +87 -11
  34. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +292 -9
  35. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +533 -118
  36. package/types/uni/uts-plugin-api/lib/uni-getLocation-system/utssdk/interface.d.ts +1 -1
  37. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +2 -2
  38. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +4 -4
  39. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +88 -74
  40. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +1357 -39
  41. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +102 -6
  42. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +164 -26
  43. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/global.d.ts +4 -4
  44. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/app-ios/interface.d.ts +14 -15
  45. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +661 -41
  46. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +13 -10
  47. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +10 -10
  48. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +2 -2
  49. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +90 -7
  50. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/global.d.ts +42 -0
  51. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/index.d.ts +20 -0
  52. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +466 -0
  53. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +152 -2
  54. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/global.d.ts +4 -4
  55. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/index.d.ts +2 -2
  56. package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +42 -37
  57. package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +193 -19
  58. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +10 -10
  59. package/types/uni/uts-plugin-extend/README.md +3 -0
  60. package/types/uni/uts-plugin-extend/global.d.ts +14 -0
  61. package/types/uni/uts-plugin-extend/index.d.ts +16 -0
  62. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/global.d.ts +12 -0
  63. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/index.d.ts +1 -0
  64. package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/interface.d.ts +365 -0
  65. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/global.d.ts +23 -0
  66. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/index.d.ts +10 -0
  67. package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/interface.d.ts +710 -0
  68. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/global.d.ts +21 -0
  69. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/index.d.ts +9 -0
  70. package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/interface.d.ts +151 -0
  71. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/global.d.ts +25 -0
  72. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/index.d.ts +11 -0
  73. package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/interface.d.ts +363 -0
  74. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/global.d.ts +11 -0
  75. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/index.d.ts +4 -0
  76. package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +224 -0
  77. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/global.d.ts +53 -0
  78. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/index.d.ts +25 -0
  79. package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/interface.d.ts +486 -0
  80. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +7 -0
  81. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +1 -0
  82. package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +296 -0
  83. package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/global.d.ts +21 -0
  84. package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/index.d.ts +9 -0
  85. package/types/uni/uts-plugin-extend/lib/uni-getClipboardData/utssdk/interface.d.ts +119 -0
  86. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/global.d.ts +15 -0
  87. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/index.d.ts +1 -0
  88. package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/interface.d.ts +229 -0
  89. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/global.d.ts +14 -0
  90. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/index.d.ts +1 -0
  91. package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/interface.d.ts +559 -0
  92. package/types/uni/uts-plugin-extend/lib/uni-makePhoneCall/utssdk/global.d.ts +21 -0
  93. package/types/uni/uts-plugin-extend/lib/uni-makePhoneCall/utssdk/index.d.ts +9 -0
  94. package/types/uni/uts-plugin-extend/lib/uni-makePhoneCall/utssdk/interface.d.ts +121 -0
  95. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/global.d.ts +9 -0
  96. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/index.d.ts +1 -0
  97. package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/interface.d.ts +163 -0
  98. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/global.d.ts +21 -0
  99. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/index.d.ts +9 -0
  100. package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/interface.d.ts +143 -0
  101. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/global.d.ts +7 -0
  102. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/index.d.ts +1 -0
  103. package/types/uni/uts-plugin-extend/lib/uni-preloadPage/utssdk/interface.d.ts +106 -0
  104. package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/global.d.ts +21 -0
  105. package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/index.d.ts +9 -0
  106. package/types/uni/uts-plugin-extend/lib/uni-setClipboardData/utssdk/interface.d.ts +122 -0
  107. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/global.d.ts +9 -0
  108. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/index.d.ts +1 -0
  109. package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/interface.d.ts +165 -0
  110. package/types/uni-cloud/index.d.ts +4 -0
  111. package/types/uni-cloud/interface.d.ts +106 -17
  112. package/types/vue/CheckboxGroupChangeEvent.d.ts +10 -13
  113. package/types/vue/LifeCycle.d.ts +32 -32
  114. package/types/vue/PickerViewChangeEvent.d.ts +10 -13
  115. package/types/vue/ProgressActiveendEvent.d.ts +9 -11
  116. package/types/vue/RadioGroupChangeEvent.d.ts +10 -13
  117. package/types/vue/SliderChangeEvent.d.ts +9 -10
  118. package/types/vue/SwitchChangeEvent.d.ts +11 -13
  119. package/types/vue/UniCloudDBElement.d.ts +72 -75
  120. package/types/vue/UniFormElement.d.ts +17 -19
  121. package/types/vue/UniNavigatorElement.d.ts +1 -2
  122. package/types/vue/global.d.ts +190 -0
  123. package/types/vue/index.d.ts +10 -11
  124. package/types/vue-global/index.d.ts +1 -0
@@ -2,27 +2,123 @@
2
2
 
3
3
  export type GetSystemSettingResult = {
4
4
  /**
5
- * 蓝牙是否开启
5
+ * 蓝牙是否开启
6
+ *
7
+ * @uniPlatform
8
+ * {
9
+ * "app": {
10
+ * "android": {
11
+ * "osVer": "5.0",
12
+ * "uniVer": "√",
13
+ * "unixVer": "3.9+"
14
+ * },
15
+ * "ios": {
16
+ * "osVer": "12.0",
17
+ * "uniVer": "√",
18
+ * "unixVer": "4.11"
19
+ * }
20
+ * }
21
+ * }
6
22
  */
7
23
  bluetoothEnabled?: boolean,
8
24
  /**
9
- * 蓝牙的报错信息
25
+ * 蓝牙的报错信息
26
+ *
27
+ * @uniPlatform
28
+ * {
29
+ * "app": {
30
+ * "android": {
31
+ * "osVer": "5.0",
32
+ * "uniVer": "√",
33
+ * "unixVer": "3.9+"
34
+ * },
35
+ * "ios": {
36
+ * "osVer": "12.0",
37
+ * "uniVer": "√",
38
+ * "unixVer": "4.11"
39
+ * }
40
+ * }
41
+ * }
10
42
  */
11
43
  bluetoothError?: string,
12
44
  /**
13
- * 位置是否开启
45
+ * 位置是否开启
46
+ *
47
+ * @uniPlatform
48
+ * {
49
+ * "app": {
50
+ * "android": {
51
+ * "osVer": "5.0",
52
+ * "uniVer": "√",
53
+ * "unixVer": "3.9+"
54
+ * },
55
+ * "ios": {
56
+ * "osVer": "12.0",
57
+ * "uniVer": "√",
58
+ * "unixVer": "4.11"
59
+ * }
60
+ * }
61
+ * }
14
62
  */
15
63
  locationEnabled : boolean,
16
64
  /**
17
- * wifi是否开启
65
+ * wifi是否开启
66
+ *
67
+ * @uniPlatform
68
+ * {
69
+ * "app": {
70
+ * "android": {
71
+ * "osVer": "5.0",
72
+ * "uniVer": "√",
73
+ * "unixVer": "3.9+"
74
+ * },
75
+ * "ios": {
76
+ * "osVer": "12.0",
77
+ * "uniVer": "√",
78
+ * "unixVer": "4.11"
79
+ * }
80
+ * }
81
+ * }
18
82
  */
19
83
  wifiEnabled?: boolean,
20
84
  /**
21
- * wifi的报错信息
85
+ * wifi的报错信息
86
+ *
87
+ * @uniPlatform
88
+ * {
89
+ * "app": {
90
+ * "android": {
91
+ * "osVer": "5.0",
92
+ * "uniVer": "√",
93
+ * "unixVer": "3.9+"
94
+ * },
95
+ * "ios": {
96
+ * "osVer": "x",
97
+ * "uniVer": "x",
98
+ * "unixVer": "x"
99
+ * }
100
+ * }
101
+ * }
22
102
  */
23
103
  wifiError?: string,
24
104
  /**
25
- * 设备方向
105
+ * 设备方向
106
+ *
107
+ * @uniPlatform
108
+ * {
109
+ * "app": {
110
+ * "android": {
111
+ * "osVer": "5.0",
112
+ * "uniVer": "√",
113
+ * "unixVer": "3.9+"
114
+ * },
115
+ * "ios": {
116
+ * "osVer": "12.0",
117
+ * "uniVer": "√",
118
+ * "unixVer": "4.11"
119
+ * }
120
+ * }
121
+ * }
26
122
  */
27
123
  deviceOrientation : 'portrait' | 'landscape',
28
124
  }
@@ -79,6 +79,12 @@ export type ChooseImageOptions = {
79
79
  * original 原图,compressed 压缩图,默认二者都有
80
80
  * @type string | string []
81
81
  * @defaultValue ['original','compressed']
82
+ * @uniPlatform {
83
+ * "web": {
84
+ * "uniVer": "x",
85
+ * "unixVer": "x"
86
+ * }
87
+ * }
82
88
  */
83
89
  sizeType ?: (string[]) | null,
84
90
  /**
@@ -101,6 +107,12 @@ export type ChooseImageOptions = {
101
107
  extension ?: (string[]) | null,
102
108
  /**
103
109
  * 图像裁剪参数,设置后 sizeType 失效。
110
+ * @uniPlatform {
111
+ * "web": {
112
+ * "uniVer": "x",
113
+ * "unixVer": "x"
114
+ * }
115
+ * }
104
116
  */
105
117
  crop ?: (ChooseImageCropOptions) | null,
106
118
  /**
@@ -171,7 +183,7 @@ export type PreviewImageCompleteCallback = ChooseImageCompleteCallback
171
183
 
172
184
  export type PreviewImageOptions = {
173
185
  /**
174
- * current 为当前显示图片的链接/索引值,不填或填写的值无效则为 urls 的第一张。
186
+ * current 为当前显示图片的链接/索引值,不填或填写的值无效则为 urls 的第一张。APP平台仅支持索引值。
175
187
  * @type string | number
176
188
  */
177
189
  current ?: any | null,
@@ -197,7 +209,7 @@ export type PreviewImageOptions = {
197
209
  * @uniPlatform {
198
210
  * "app": {
199
211
  * "android": {
200
- * "osVer": "4.4",
212
+ * "osVer": "5.0",
201
213
  * "uniVer": "√",
202
214
  * "unixVer": "x"
203
215
  * }
@@ -265,10 +277,22 @@ export type GetImageInfoSuccess = {
265
277
  path : string,
266
278
  /**
267
279
  * 返回图片的方向
280
+ * @uniPlatform {
281
+ * "web": {
282
+ * "uniVer": "x",
283
+ * "unixVer": "x"
284
+ * }
285
+ * }
268
286
  */
269
287
  orientation : string | null,
270
288
  /**
271
289
  * 返回图片的格式
290
+ * @uniPlatform {
291
+ * "web": {
292
+ * "uniVer": "x",
293
+ * "unixVer": "x"
294
+ * }
295
+ * }
272
296
  */
273
297
  type : string | null
274
298
  };
@@ -357,10 +381,12 @@ export type CompressImageOptions = {
357
381
  rotate ?: number | null,
358
382
  /**
359
383
  * 缩放图片的宽度
384
+ * @deprecated 已废弃
360
385
  */
361
386
  width ?: string | null,
362
387
  /**
363
388
  * 缩放图片的高度
389
+ * @deprecated 已废弃
364
390
  */
365
391
  height ?: string | null,
366
392
  /**
@@ -429,10 +455,23 @@ export type ChooseVideoOptions = {
429
455
  /**
430
456
  * 是否压缩所选的视频源文件,默认值为true,需要压缩
431
457
  * @type boolean
458
+ * @default true
459
+ * @uniPlatform {
460
+ * "web": {
461
+ * "uniVer": "x",
462
+ * "unixVer": "x"
463
+ * }
464
+ * }
432
465
  */
433
466
  compressed ?: boolean | null,
434
467
  /**
435
468
  * 拍摄视频最长拍摄时间,单位秒。最长支持 60 秒
469
+ * @uniPlatform {
470
+ * "web": {
471
+ * "uniVer": "x",
472
+ * "unixVer": "x"
473
+ * }
474
+ * }
436
475
  */
437
476
  maxDuration ?: number | null,
438
477
  /**
@@ -440,10 +479,25 @@ export type ChooseVideoOptions = {
440
479
  * - front: 前置摄像头
441
480
  * - back: 后置摄像头
442
481
  * @type 'front' | 'back'
482
+ * @uniPlatform {
483
+ * "web": {
484
+ * "uniVer": "x",
485
+ * "unixVer": "x"
486
+ * }
487
+ * }
443
488
  */
444
489
  camera ?: string | null,
445
490
  /**
446
491
  * 根据文件拓展名过滤,每一项都不能是空字符串。默认不过滤。
492
+ * @uniPlatform {
493
+ * "app": {
494
+ * "android": {
495
+ * "osVer": "5.0",
496
+ * "uniVer": "√",
497
+ * "unixVer": "x"
498
+ * }
499
+ * }
500
+ * }
447
501
  */
448
502
  extension ?: (string[]) | null,
449
503
  /**
@@ -465,10 +519,22 @@ export type ChooseVideo = (options : ChooseVideoOptions) => void;
465
519
  export type GetVideoInfoSuccess = {
466
520
  /**
467
521
  * 画面方向
522
+ * @uniPlatform {
523
+ * "web": {
524
+ * "uniVer": "x",
525
+ * "unixVer": "x"
526
+ * }
527
+ * }
468
528
  */
469
529
  orientation : string | null,
470
530
  /**
471
531
  * 视频格式
532
+ * @uniPlatform {
533
+ * "web": {
534
+ * "uniVer": "x",
535
+ * "unixVer": "x"
536
+ * }
537
+ * }
472
538
  */
473
539
  type : string | null,
474
540
  /**
@@ -489,10 +555,22 @@ export type GetVideoInfoSuccess = {
489
555
  width : number,
490
556
  /**
491
557
  * 视频帧率
558
+ * @uniPlatform {
559
+ * "web": {
560
+ * "uniVer": "x",
561
+ * "unixVer": "x"
562
+ * }
563
+ * }
492
564
  */
493
565
  fps : number | null,
494
566
  /**
495
567
  * 视频码率,单位 kbps
568
+ * @uniPlatform {
569
+ * "web": {
570
+ * "uniVer": "x",
571
+ * "unixVer": "x"
572
+ * }
573
+ * }
496
574
  */
497
575
  bitrate : number | null
498
576
  };
@@ -582,10 +660,28 @@ export type CompressVideoOptions = {
582
660
  quality ?: string | null,
583
661
  /**
584
662
  * 码率,单位 kbps
663
+ * @uniPlatform {
664
+ * "app": {
665
+ * "android": {
666
+ * "osVer": "5.0",
667
+ * "uniVer": "√",
668
+ * "unixVer": "x"
669
+ * }
670
+ * }
671
+ * }
585
672
  */
586
673
  bitrate ?: number | null,
587
674
  /**
588
675
  * 帧率
676
+ * @uniPlatform {
677
+ * "app": {
678
+ * "android": {
679
+ * "osVer": "5.0",
680
+ * "uniVer": "√",
681
+ * "unixVer": "x"
682
+ * }
683
+ * }
684
+ * }
589
685
  */
590
686
  fps ?: number | null,
591
687
  /**
@@ -615,7 +711,7 @@ export interface Uni {
615
711
  * @uniPlatform {
616
712
  * "app": {
617
713
  * "android": {
618
- * "osVer": "4.4",
714
+ * "osVer": "5.0",
619
715
  * "uniVer": "√",
620
716
  * "unixVer": "3.9+"
621
717
  * },
@@ -652,7 +748,7 @@ export interface Uni {
652
748
  * @uniPlatform {
653
749
  * "app": {
654
750
  * "android": {
655
- * "osVer": "4.4",
751
+ * "osVer": "5.0",
656
752
  * "uniVer": "√",
657
753
  * "unixVer": "3.9+"
658
754
  * },
@@ -689,7 +785,7 @@ export interface Uni {
689
785
  * @uniPlatform {
690
786
  * "app": {
691
787
  * "android": {
692
- * "osVer": "4.4",
788
+ * "osVer": "5.0",
693
789
  * "uniVer": "√",
694
790
  * "unixVer": "3.9+"
695
791
  * },
@@ -698,7 +794,11 @@ export interface Uni {
698
794
  * "uniVer": "√",
699
795
  * "unixVer": "4.11"
700
796
  * }
701
- * }
797
+ * },
798
+ * "web": {
799
+ * "uniVer": "√",
800
+ * "unixVer": "4.0"
801
+ * }
702
802
  * }
703
803
  * @uniVueVersion 2,3
704
804
  * @example
@@ -721,11 +821,15 @@ export interface Uni {
721
821
  * @uniPlatform {
722
822
  * "app": {
723
823
  * "android": {
724
- * "osVer": "4.4",
824
+ * "osVer": "5.0",
725
825
  * "uniVer": "√",
726
- * "unixVer": "3.9+"
826
+ * "unixVer": "4.18"
727
827
  * }
728
- * }
828
+ * },
829
+ * "web": {
830
+ * "uniVer": "√",
831
+ * "unixVer": "4.0"
832
+ * }
729
833
  * }
730
834
  * @uniVueVersion 2,3
731
835
  * @example
@@ -754,7 +858,7 @@ export interface Uni {
754
858
  * @uniPlatform {
755
859
  * "app": {
756
860
  * "android": {
757
- * "osVer": "4.4",
861
+ * "osVer": "5.0",
758
862
  * "uniVer": "√",
759
863
  * "unixVer": "3.9+"
760
864
  * },
@@ -763,7 +867,11 @@ export interface Uni {
763
867
  * "uniVer": "√",
764
868
  * "unixVer": "4.11"
765
869
  * }
766
- * }
870
+ * },
871
+ * "web": {
872
+ * "uniVer": "x",
873
+ * "unixVer": "x"
874
+ * }
767
875
  * }
768
876
  * @uniVueVersion 2,3
769
877
  * @example
@@ -792,11 +900,15 @@ export interface Uni {
792
900
  * @uniPlatform {
793
901
  * "app": {
794
902
  * "android": {
795
- * "osVer": "4.4",
903
+ * "osVer": "5.0",
796
904
  * "uniVer": "√",
797
- * "unixVer": "3.9+"
905
+ * "unixVer": "4.18"
798
906
  * }
799
- * }
907
+ * },
908
+ * "web": {
909
+ * "uniVer": "√",
910
+ * "unixVer": "4.0"
911
+ * }
800
912
  * }
801
913
  * @uniVueVersion 2,3
802
914
  * @example
@@ -826,11 +938,20 @@ export interface Uni {
826
938
  * @uniPlatform {
827
939
  * "app": {
828
940
  * "android": {
829
- * "osVer": "4.4",
941
+ * "osVer": "5.0",
830
942
  * "uniVer": "√",
831
- * "unixVer": "3.9+"
943
+ * "unixVer": "4.18"
944
+ * },
945
+ * "ios": {
946
+ * "osVer": "12.0",
947
+ * "uniVer": "√",
948
+ * "unixVer": "4.18"
832
949
  * }
833
- * }
950
+ * },
951
+ * "web": {
952
+ * "uniVer": "√",
953
+ * "unixVer": "4.0"
954
+ * }
834
955
  * }
835
956
  * @uniVueVersion 2,3
836
957
  * @example
@@ -851,11 +972,15 @@ export interface Uni {
851
972
  * @uniPlatform {
852
973
  * "app": {
853
974
  * "android": {
854
- * "osVer": "4.4",
975
+ * "osVer": "5.0",
855
976
  * "uniVer": "√",
856
- * "unixVer": "3.9+"
977
+ * "unixVer": "4.18"
857
978
  * }
858
- * }
979
+ * },
980
+ * "web": {
981
+ * "uniVer": "√",
982
+ * "unixVer": "4.0"
983
+ * }
859
984
  * }
860
985
  * @uniVueVersion 2,3
861
986
  * @example
@@ -877,11 +1002,20 @@ export interface Uni {
877
1002
  * @uniPlatform {
878
1003
  * "app": {
879
1004
  * "android": {
880
- * "osVer": "4.4",
1005
+ * "osVer": "5.0",
881
1006
  * "uniVer": "√",
882
- * "unixVer": "3.9+"
1007
+ * "unixVer": "4.18"
1008
+ * },
1009
+ * "ios": {
1010
+ * "osVer": "12.0",
1011
+ * "uniVer": "√",
1012
+ * "unixVer": "4.18"
883
1013
  * }
884
- * }
1014
+ * },
1015
+ * "web": {
1016
+ * "uniVer": "x",
1017
+ * "unixVer": "x"
1018
+ * }
885
1019
  * }
886
1020
  * @uniVueVersion 2,3
887
1021
  * @example
@@ -903,11 +1037,15 @@ export interface Uni {
903
1037
  * @uniPlatform {
904
1038
  * "app": {
905
1039
  * "android": {
906
- * "osVer": "4.4",
1040
+ * "osVer": "5.0",
907
1041
  * "uniVer": "√",
908
- * "unixVer": "3.9+"
1042
+ * "unixVer": "4.18"
909
1043
  * }
910
- * }
1044
+ * },
1045
+ * "web": {
1046
+ * "uniVer": "√",
1047
+ * "unixVer": "4.0"
1048
+ * }
911
1049
  * }
912
1050
  * @uniVueVersion 2,3
913
1051
  * @example
@@ -39,14 +39,14 @@ import {
39
39
  } from './interface'
40
40
 
41
41
  declare global {
42
- type Request = RequestOrigin
43
- type RequestOptions = RequestOptionsOrigin
44
- type RequestSuccess = RequestSuccessOrigin
42
+ type Request<T> = RequestOrigin<T>
43
+ type RequestOptions<T> = RequestOptionsOrigin<T>
44
+ type RequestSuccess<T> = RequestSuccessOrigin<T>
45
45
  type RequestMethod = RequestMethodOrigin
46
46
  type RequestErrorCode = RequestErrorCodeOrigin
47
47
  type RequestFail = RequestFailOrigin
48
48
  type RequestFail = RequestFailOrigin
49
- type RequestSuccessCallback = RequestSuccessCallbackOrigin
49
+ type RequestSuccessCallback<T> = RequestSuccessCallbackOrigin<T>
50
50
  type RequestFailCallback = RequestFailCallbackOrigin
51
51
  type RequestCompleteCallback = RequestCompleteCallbackOrigin
52
52
  type RequestTask = RequestTaskOrigin
@@ -1,10 +1,10 @@
1
1
 
2
- export type Request = (param: RequestOptions) => RequestTask;
2
+ export type Request<T> = (param: RequestOptions<T>) => RequestTask;
3
3
 
4
4
  /**
5
5
  * 网络请求参数
6
6
  */
7
- export type RequestOptions = {
7
+ export type RequestOptions<T> = {
8
8
  /**
9
9
  * 开发者服务器接口地址
10
10
  */
@@ -80,7 +80,7 @@ export type RequestOptions = {
80
80
  * 网络请求成功回调。
81
81
  * @defaultValue null
82
82
  */
83
- success?: RequestSuccessCallback | null,
83
+ success?: RequestSuccessCallback<T> | null,
84
84
  /**
85
85
  * 网络请求失败回调。
86
86
  * @defaultValue null
@@ -93,12 +93,12 @@ export type RequestOptions = {
93
93
  complete?: RequestCompleteCallback | null
94
94
  }
95
95
 
96
- export type RequestSuccess = {
96
+ export type RequestSuccess<T> = {
97
97
  /**
98
98
  * 开发者服务器返回的数据
99
99
  * @type {RequestDataOptions}
100
100
  */
101
- data: any | null,
101
+ data: T | null,
102
102
  /**
103
103
  * 开发者服务器返回的 HTTP 状态码
104
104
  */
@@ -138,7 +138,7 @@ export type RequestMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD"
138
138
  export type RequestErrorCode = 5 | 1000 | 100001 | 100002 | 600003 | 600009 | 602001;
139
139
 
140
140
 
141
- export type RequestFail = UniError;
141
+ // export type RequestFail = UniError;
142
142
  // /**
143
143
  // * 网络请求失败的错误回调参数
144
144
  // */
@@ -146,8 +146,7 @@ export type RequestFail = UniError;
146
146
  // errCode: RequestErrorCode
147
147
  // };
148
148
 
149
-
150
- export type RequestSuccessCallback = (option: RequestSuccess) => void;
149
+ export type RequestSuccessCallback<T> = (option: RequestSuccess<T>) => void;
151
150
  export type RequestFailCallback = (option: RequestFail) => void;
152
151
  export type RequestCompleteCallback = (option: any) => void;
153
152
 
@@ -231,7 +230,7 @@ export type UploadFileSuccess = {
231
230
  statusCode: number
232
231
  };
233
232
  export type UploadFileSuccessCallback = (result: UploadFileSuccess) => void;
234
- export type UploadFileFail = UniError;
233
+ // export type UploadFileFail = UniError;
235
234
  // /**
236
235
  // * 上传文件失败的错误回调参数
237
236
  // */
@@ -260,7 +259,7 @@ export type UploadFileOptions = {
260
259
  * 需要上传的文件列表。
261
260
  * @defaultValue null
262
261
  */
263
- files?: (UploadFileOptionFiles[]) | null,
262
+ files?: Array<UploadFileOptionFiles> | null,
264
263
  /**
265
264
  * HTTP 请求 Header, header 中不能设置 Referer
266
265
  * @defaultValue null
@@ -387,7 +386,7 @@ export type DownloadFileSuccess = {
387
386
  statusCode: number
388
387
  };
389
388
  export type DownloadFileSuccessCallback = (result: DownloadFileSuccess) => void;
390
- export type DownloadFileFail = UniError;
389
+ // export type DownloadFileFail = UniError;
391
390
  // /**
392
391
  // * 下载文件失败的错误回调参数
393
392
  // */
@@ -413,7 +412,7 @@ export type DownloadFileOptions = {
413
412
  * `/imgs/pic.png`
414
413
  * 并且支持指定下载目录,例:
415
414
  * `/imgs/`
416
- * 支持uni.env
415
+ * 支持uni.env的平台兼容性:Android自3.9开始支持uni.env,iOS自4.13开始支持uni.env
417
416
  * @defaultValue null
418
417
  */
419
418
  filePath?: string | null,
@@ -570,7 +569,7 @@ export interface Uni {
570
569
  });
571
570
  ```
572
571
  */
573
- request: Request,
572
+ request<T>(param: RequestOptions<T>): RequestTask;
574
573
  /**
575
574
  * UploadFile()
576
575
  * @description
@@ -607,7 +606,7 @@ export interface Uni {
607
606
  });
608
607
  ```
609
608
  */
610
- uploadFile: UploadFile,
609
+ uploadFile: UploadFile;
611
610
  /**
612
611
  * DownloadFile()
613
612
  * @description
@@ -639,5 +638,5 @@ export interface Uni {
639
638
  });
640
639
  ```
641
640
  */
642
- downloadFile: DownloadFile
641
+ downloadFile: DownloadFile;
643
642
  }