@dcloudio/uni-app-x 0.7.59 → 0.7.60

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 (149) hide show
  1. package/package.json +1 -1
  2. package/types/app.d.ts +16 -8
  3. package/types/native/IUniElement.d.ts +0 -2
  4. package/types/native/UniFormControl.d.ts +1 -1
  5. package/types/native/UniSwiperAnimationFinishEvent.d.ts +1 -0
  6. package/types/native/UniSwiperChangeEvent.d.ts +1 -0
  7. package/types/native/WebViewStyles.d.ts +1 -1
  8. package/types/native/global.d.ts +2 -0
  9. package/types/page.d.ts +134 -22
  10. package/types/uni/uni-camera-global.d.ts +4 -0
  11. package/types/uni/uni-camera.d.ts +10 -9
  12. package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +3 -2
  13. package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +3 -2
  14. package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +9 -6
  15. package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +3 -2
  16. package/types/uni/uts-plugin-api/lib/uni-chooseMedia/utssdk/interface.d.ts +4 -4
  17. package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +10 -8
  18. package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +10 -10
  19. package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +3 -2
  20. package/types/uni/uts-plugin-api/lib/uni-createRequestPermissionListener/utssdk/interface.d.ts +2 -2
  21. package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +2 -2
  22. package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +7 -6
  23. package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +5 -3
  24. package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +8 -8
  25. package/types/uni/uts-plugin-api/lib/uni-exit/utssdk/interface.d.ts +4 -1
  26. package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +26 -11
  27. package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +2 -2
  28. package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +3 -3
  29. package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +11 -10
  30. package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +2 -2
  31. package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +1 -1
  32. package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +4 -4
  33. package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +8 -8
  34. package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +8 -6
  35. package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +1 -1
  36. package/types/uni/uts-plugin-api/lib/uni-getProvider/utssdk/interface.d.ts +4 -4
  37. package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +7 -7
  38. package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +2 -2
  39. package/types/uni/uts-plugin-api/lib/uni-installApk/utssdk/interface.d.ts +1 -1
  40. package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +4 -4
  41. package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +246 -236
  42. package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +4 -4
  43. package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +3 -2
  44. package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +141 -243
  45. package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/interface.d.ts +80 -696
  46. package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +10 -8
  47. package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +387 -95
  48. package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/interface.d.ts +401 -344
  49. package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +52 -52
  50. package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +2 -2
  51. package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +11 -11
  52. package/types/uni/uts-plugin-api/lib/uni-previewImage/utssdk/interface.d.ts +5 -5
  53. package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +24 -24
  54. package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +4 -4
  55. package/types/uni/uts-plugin-api/lib/uni-recorder/utssdk/interface.d.ts +39 -25
  56. package/types/uni/uts-plugin-api/lib/uni-requestMerchantTransfer/utssdk/interface.d.ts +3 -0
  57. package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +10 -10
  58. package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +2 -2
  59. package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +4 -4
  60. package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +20 -20
  61. package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +18 -18
  62. package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +49 -49
  63. package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/interface.d.ts +5 -5
  64. package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +26 -26
  65. package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +14 -14
  66. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/global.d.ts +16 -2
  67. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/index.d.ts +8 -1
  68. package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/interface.d.ts +153 -6
  69. package/types/uni-cloud/interface.d.ts +13 -9
  70. package/types/uni/uts-plugin-api/.temp/uni-actionSheet/utssdk/interface.uts +0 -554
  71. package/types/uni/uts-plugin-api/.temp/uni-addPhoneContact/utssdk/interface.uts +0 -224
  72. package/types/uni/uts-plugin-api/.temp/uni-arrayBufferToBase64/utssdk/interface.uts +0 -77
  73. package/types/uni/uts-plugin-api/.temp/uni-authentication/utssdk/interface.uts +0 -365
  74. package/types/uni/uts-plugin-api/.temp/uni-base64ToArrayBuffer/utssdk/interface.uts +0 -77
  75. package/types/uni/uts-plugin-api/.temp/uni-canvas/utssdk/interface.uts +0 -972
  76. package/types/uni/uts-plugin-api/.temp/uni-chooseLocation/utssdk/interface.uts +0 -410
  77. package/types/uni/uts-plugin-api/.temp/uni-chooseMedia/utssdk/interface.uts +0 -459
  78. package/types/uni/uts-plugin-api/.temp/uni-clipboard/utssdk/interface.uts +0 -203
  79. package/types/uni/uts-plugin-api/.temp/uni-createInnerAudioContext/utssdk/interface.uts +0 -2613
  80. package/types/uni/uts-plugin-api/.temp/uni-createIntersectionObserver/utssdk/interface.uts +0 -152
  81. package/types/uni/uts-plugin-api/.temp/uni-createRequestPermissionListener/utssdk/interface.uts +0 -61
  82. package/types/uni/uts-plugin-api/.temp/uni-createSelectorQuery/utssdk/interface.uts +0 -548
  83. package/types/uni/uts-plugin-api/.temp/uni-createWebviewContext/utssdk/interface.uts +0 -137
  84. package/types/uni/uts-plugin-api/.temp/uni-dialogPage/utssdk/interface.uts +0 -1380
  85. package/types/uni/uts-plugin-api/.temp/uni-document/utssdk/interface.uts +0 -76
  86. package/types/uni/uts-plugin-api/.temp/uni-event/utssdk/interface.uts +0 -338
  87. package/types/uni/uts-plugin-api/.temp/uni-exit/utssdk/interface.uts +0 -102
  88. package/types/uni/uts-plugin-api/.temp/uni-file/utssdk/interface.uts +0 -384
  89. package/types/uni/uts-plugin-api/.temp/uni-fileSystemManager/utssdk/interface.uts +0 -5316
  90. package/types/uni/uts-plugin-api/.temp/uni-getAccessibilityInfo/utssdk/interface.uts +0 -35
  91. package/types/uni/uts-plugin-api/.temp/uni-getAppAuthorizeSetting/utssdk/interface.uts +0 -616
  92. package/types/uni/uts-plugin-api/.temp/uni-getAppBaseInfo/utssdk/interface.uts +0 -2157
  93. package/types/uni/uts-plugin-api/.temp/uni-getBackgroundAudioManager/utssdk/interface.uts +0 -895
  94. package/types/uni/uts-plugin-api/.temp/uni-getDeviceInfo/utssdk/interface.uts +0 -1755
  95. package/types/uni/uts-plugin-api/.temp/uni-getElementById/utssdk/interface.uts +0 -82
  96. package/types/uni/uts-plugin-api/.temp/uni-getEnterOptionsSync/utssdk/interface.uts +0 -295
  97. package/types/uni/uts-plugin-api/.temp/uni-getLaunchOptionsSync/utssdk/interface.uts +0 -299
  98. package/types/uni/uts-plugin-api/.temp/uni-getLocation/utssdk/interface.uts +0 -1764
  99. package/types/uni/uts-plugin-api/.temp/uni-getLocation-system/utssdk/interface.uts +0 -1
  100. package/types/uni/uts-plugin-api/.temp/uni-getLocation-tencent/utssdk/interface.uts +0 -1
  101. package/types/uni/uts-plugin-api/.temp/uni-getLocation-tencent-uni1/utssdk/interface.uts +0 -736
  102. package/types/uni/uts-plugin-api/.temp/uni-getNetworkType/utssdk/interface.uts +0 -274
  103. package/types/uni/uts-plugin-api/.temp/uni-getPerformance/utssdk/interface.uts +0 -198
  104. package/types/uni/uts-plugin-api/.temp/uni-getProvider/utssdk/interface.uts +0 -634
  105. package/types/uni/uts-plugin-api/.temp/uni-getRecorderManager/utssdk/interface.uts +0 -980
  106. package/types/uni/uts-plugin-api/.temp/uni-getSystemInfo/utssdk/interface.uts +0 -5550
  107. package/types/uni/uts-plugin-api/.temp/uni-getSystemSetting/utssdk/interface.uts +0 -501
  108. package/types/uni/uts-plugin-api/.temp/uni-installApk/utssdk/interface.uts +0 -83
  109. package/types/uni/uts-plugin-api/.temp/uni-interceptor/utssdk/interface.uts +0 -169
  110. package/types/uni/uts-plugin-api/.temp/uni-keyboard/utssdk/interface.uts +0 -102
  111. package/types/uni/uts-plugin-api/.temp/uni-loadFontFace/utssdk/interface.uts +0 -580
  112. package/types/uni/uts-plugin-api/.temp/uni-makePhoneCall/utssdk/interface.uts +0 -100
  113. package/types/uni/uts-plugin-api/.temp/uni-media/utssdk/interface.uts +0 -2980
  114. package/types/uni/uts-plugin-api/.temp/uni-modal/utssdk/interface.uts +0 -190
  115. package/types/uni/uts-plugin-api/.temp/uni-navigationBar/utssdk/interface.uts +0 -1002
  116. package/types/uni/uts-plugin-api/.temp/uni-network/utssdk/interface.uts +0 -3620
  117. package/types/uni/uts-plugin-api/.temp/uni-oauth/utssdk/interface.uts +0 -1592
  118. package/types/uni/uts-plugin-api/.temp/uni-oauth-huawei/utssdk/interface.uts +0 -1
  119. package/types/uni/uts-plugin-api/.temp/uni-openAppAuthorizeSetting/utssdk/interface.uts +0 -254
  120. package/types/uni/uts-plugin-api/.temp/uni-openDocument/utssdk/interface.uts +0 -112
  121. package/types/uni/uts-plugin-api/.temp/uni-pageScrollTo/utssdk/interface.uts +0 -153
  122. package/types/uni/uts-plugin-api/.temp/uni-payment/utssdk/interface.uts +0 -833
  123. package/types/uni/uts-plugin-api/.temp/uni-payment-alipay/utssdk/interface.uts +0 -1
  124. package/types/uni/uts-plugin-api/.temp/uni-payment-huawei/utssdk/interface.uts +0 -1
  125. package/types/uni/uts-plugin-api/.temp/uni-payment-wxpay/utssdk/interface.uts +0 -3
  126. package/types/uni/uts-plugin-api/.temp/uni-previewImage/utssdk/interface.uts +0 -518
  127. package/types/uni/uts-plugin-api/.temp/uni-privacy/utssdk/interface.uts +0 -560
  128. package/types/uni/uts-plugin-api/.temp/uni-prompt/utssdk/interface.uts +0 -2607
  129. package/types/uni/uts-plugin-api/.temp/uni-pullDownRefresh/utssdk/interface.uts +0 -189
  130. package/types/uni/uts-plugin-api/.temp/uni-requestMerchantTransfer/utssdk/interface.uts +0 -710
  131. package/types/uni/uts-plugin-api/.temp/uni-route/utssdk/interface.uts +0 -2695
  132. package/types/uni/uts-plugin-api/.temp/uni-rpx2px/utssdk/interface.uts +0 -80
  133. package/types/uni/uts-plugin-api/.temp/uni-scanCode/utssdk/interface.uts +0 -130
  134. package/types/uni/uts-plugin-api/.temp/uni-shareWithSystem/utssdk/interface.uts +0 -719
  135. package/types/uni/uts-plugin-api/.temp/uni-sse/utssdk/interface.uts +0 -277
  136. package/types/uni/uts-plugin-api/.temp/uni-storage/utssdk/interface.uts +0 -1020
  137. package/types/uni/uts-plugin-api/.temp/uni-tabBar/utssdk/interface.uts +0 -1148
  138. package/types/uni/uts-plugin-api/.temp/uni-theme/utssdk/interface.uts +0 -1059
  139. package/types/uni/uts-plugin-api/.temp/uni-virtualPayment/utssdk/interface.uts +0 -1660
  140. package/types/uni/uts-plugin-api/.temp/uni-websocket/utssdk/interface.uts +0 -1941
  141. package/types/uni/uts-plugin-biz/.temp/uni-ad/utssdk/interface.uts +0 -726
  142. package/types/uni/uts-plugin-biz/.temp/uni-crash/utssdk/interface.uts +0 -89
  143. package/types/uni/uts-plugin-biz/.temp/uni-facialRecognitionVerify/utssdk/interface.uts +0 -212
  144. package/types/uni/uts-plugin-biz/.temp/uni-map-tencent/utssdk/interface.uts +0 -2359
  145. package/types/uni/uts-plugin-biz/.temp/uni-push/utssdk/interface.uts +0 -960
  146. package/types/uni/uts-plugin-biz/.temp/uni-secure-network/utssdk/interface.uts +0 -204
  147. package/types/uni/uts-plugin-biz/.temp/uni-verify/utssdk/interface.uts +0 -730
  148. package/types/uni/uts-plugin-component/.temp/uni-camera/utssdk/interface.uts +0 -221
  149. package/types/uni/uts-plugin-component/.temp/uni-video/utssdk/interface.uts +0 -935
@@ -1,274 +0,0 @@
1
- export interface Uni {
2
- /**
3
- * getNetworkType()
4
- * @description
5
- * 获取网络类型
6
- * @param {GetNetworkTypeOptions} options
7
- * @return {void}
8
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/system/network.html#getnetworktype
9
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-network-type.html
10
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-network-type.html
11
- * @uniPlatform {
12
- * "app": {
13
- * "android": {
14
- * "osVer": "5.0",
15
- * "uniVer": "√",
16
- * "unixVer": "3.9+"
17
- * },
18
- * "ios": {
19
- * "osVer": "12.0",
20
- * "uniVer": "√",
21
- * "unixVer": "4.11"
22
- * },
23
- * "harmony": {
24
- * "osVer": "3.0",
25
- * "uniVer": "4.24",
26
- * "unixVer": "4.61"
27
- * }
28
- * },
29
- * "mp": {
30
- * "weixin": {
31
- * "hostVer": "√",
32
- * "uniVer": "√",
33
- * "unixVer": "4.41"
34
- * },
35
- * "alipay": {
36
- * "hostVer": "√",
37
- * "uniVer": "√",
38
- * "unixVer": "x"
39
- * },
40
- * "baidu": {
41
- * "hostVer": "√",
42
- * "uniVer": "√",
43
- * "unixVer": "x"
44
- * },
45
- * "toutiao": {
46
- * "hostVer": "√",
47
- * "uniVer": "√",
48
- * "unixVer": "x"
49
- * },
50
- * "lark": {
51
- * "hostVer": "√",
52
- * "uniVer": "√",
53
- * "unixVer": "x"
54
- * },
55
- * "qq": {
56
- * "hostVer": "√",
57
- * "uniVer": "√",
58
- * "unixVer": "x"
59
- * },
60
- * "kuaishou": {
61
- * "hostVer": "√",
62
- * "uniVer": "√",
63
- * "unixVer": "x"
64
- * },
65
- * "jd": {
66
- * "hostVer": "√",
67
- * "uniVer": "√",
68
- * "unixVer": "x"
69
- * }
70
- * },
71
- * "web": {
72
- * "uniVer": "√",
73
- * "unixVer": "4.0"
74
- * }
75
- * }
76
- * @example
77
- * ```typescript
78
- * uni.getNetworkType({
79
- * success(res){
80
- * console.log(res);
81
- * }
82
- * });
83
- * ```
84
- */
85
- getNetworkType(options: GetNetworkTypeOptions): void;
86
- /**
87
- * 监听网络状态变化
88
- *
89
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/system/network.html#onnetworkstatuschange
90
- * @tutorial https://uniapp.dcloud.net.cn/api/system/network.html#onnetworkstatuschange
91
- * @uniPlatform {
92
- * "app": {
93
- * "android": {
94
- * "osVer": "5.0",
95
- * "uniVer": "√",
96
- * "unixVer": "3.9+"
97
- * },
98
- * "ios": {
99
- * "osVer": "12.0",
100
- * "uniVer": "√",
101
- * "unixVer": "4.11"
102
- * },
103
- * "harmony": {
104
- * "osVer": "3.0",
105
- * "uniVer": "4.24",
106
- * "unixVer": "4.61"
107
- * }
108
- * },
109
- * "mp": {
110
- * "weixin": {
111
- * "hostVer": "√",
112
- * "uniVer": "√",
113
- * "unixVer": "4.41"
114
- * },
115
- * "alipay": {
116
- * "hostVer": "√",
117
- * "uniVer": "√",
118
- * "unixVer": "x"
119
- * },
120
- * "baidu": {
121
- * "hostVer": "√",
122
- * "uniVer": "√",
123
- * "unixVer": "x"
124
- * },
125
- * "toutiao": {
126
- * "hostVer": "√",
127
- * "uniVer": "√",
128
- * "unixVer": "x"
129
- * },
130
- * "lark": {
131
- * "hostVer": "√",
132
- * "uniVer": "√",
133
- * "unixVer": "x"
134
- * },
135
- * "qq": {
136
- * "hostVer": "√",
137
- * "uniVer": "√",
138
- * "unixVer": "x"
139
- * },
140
- * "kuaishou": {
141
- * "hostVer": "√",
142
- * "uniVer": "√",
143
- * "unixVer": "x"
144
- * },
145
- * "jd": {
146
- * "hostVer": "√",
147
- * "uniVer": "√",
148
- * "unixVer": "x"
149
- * }
150
- * },
151
- * "web": {
152
- * "uniVer": "√",
153
- * "unixVer": "4.0"
154
- * }
155
- * }
156
- */
157
- onNetworkStatusChange(callback: OnNetworkStatusChangeCallback): void;
158
- /**
159
- * 取消监听网络状态变化
160
- *
161
- * @tutorial-uni-app https://uniapp.dcloud.net.cn/api/system/network.html#offnetworkstatuschange
162
- * @tutorial https://uniapp.dcloud.net.cn/api/system/network.html#offnetworkstatuschange
163
- * @uniPlatform {
164
- * "app": {
165
- * "android": {
166
- * "osVer": "5.0",
167
- * "uniVer": "√",
168
- * "unixVer": "3.9+"
169
- * },
170
- * "ios": {
171
- * "osVer": "12.0",
172
- * "uniVer": "√",
173
- * "unixVer": "4.11"
174
- * },
175
- * "harmony": {
176
- * "osVer": "3.0",
177
- * "uniVer": "4.24",
178
- * "unixVer": "4.61"
179
- * }
180
- * },
181
- * "mp": {
182
- * "weixin": {
183
- * "hostVer": "√",
184
- * "uniVer": "√",
185
- * "unixVer": "4.41"
186
- * },
187
- * "alipay": {
188
- * "hostVer": "√",
189
- * "uniVer": "√",
190
- * "unixVer": "x"
191
- * },
192
- * "baidu": {
193
- * "hostVer": "√",
194
- * "uniVer": "√",
195
- * "unixVer": "x"
196
- * },
197
- * "toutiao": {
198
- * "hostVer": "√",
199
- * "uniVer": "√",
200
- * "unixVer": "x"
201
- * },
202
- * "lark": {
203
- * "hostVer": "√",
204
- * "uniVer": "√",
205
- * "unixVer": "x"
206
- * },
207
- * "qq": {
208
- * "hostVer": "√",
209
- * "uniVer": "√",
210
- * "unixVer": "x"
211
- * },
212
- * "kuaishou": {
213
- * "hostVer": "√",
214
- * "uniVer": "√",
215
- * "unixVer": "x"
216
- * },
217
- * "jd": {
218
- * "hostVer": "√",
219
- * "uniVer": "√",
220
- * "unixVer": "x"
221
- * }
222
- * },
223
- * "web": {
224
- * "uniVer": "√",
225
- * "unixVer": "4.0"
226
- * }
227
- * }
228
- */
229
- offNetworkStatusChange(callback: (result: any) => void): void;
230
- }
231
-
232
- export type GetNetworkType = (options: GetNetworkTypeOptions) => void;
233
- export type GetNetworkTypeSuccess = {
234
- /**
235
- * 网络类型
236
- */
237
- networkType: string
238
- };
239
- export type GetNetworkTypeSuccessCallback = (result: GetNetworkTypeSuccess) => void;
240
- export type GetNetworkTypeFail = UniError;
241
- export type GetNetworkTypeFailCallback = (result: GetNetworkTypeFail) => void;
242
- export type GetNetworkTypeComplete = any;
243
- export type GetNetworkTypeCompleteCallback = (result: GetNetworkTypeComplete) => void;
244
- export type GetNetworkTypeOptions = {
245
- /**
246
- * 接口调用成功的回调函数
247
- * @defaultValue null
248
- */
249
- success?: GetNetworkTypeSuccessCallback | null,
250
- /**
251
- * 接口调用失败的回调函数
252
- * @defaultValue null
253
- */
254
- fail?: GetNetworkTypeFailCallback | null,
255
- /**
256
- * 接口调用结束的回调函数(调用成功、失败都会执行)
257
- * @defaultValue null
258
- */
259
- complete?: GetNetworkTypeCompleteCallback | null
260
- };
261
- export type OnNetworkStatusChangeCallbackResult = {
262
- /**
263
- * 当前是否有网络连接
264
- * @type boolean
265
- */
266
- isConnected: boolean,
267
- /**
268
- * 网络类型
269
- */
270
- networkType: string
271
- };
272
- export type OnNetworkStatusChangeCallback = (result: OnNetworkStatusChangeCallbackResult) => void;
273
- export type OnNetworkStatusChange = (callback: OnNetworkStatusChangeCallback) => void;
274
- export type OffNetworkStatusChange = (callback: (result: any) => void) => void;
@@ -1,198 +0,0 @@
1
- export type GetPerformance = () => Performance
2
-
3
- export type PerformanceObserverCallback = (
4
- entries: PerformanceObserverEntryList,
5
- ) => void
6
-
7
- export type PerformanceEntry = {
8
- /**
9
- * 指标类型
10
- * @type string
11
- */
12
- entryType: string
13
- /**
14
- * 指标名称
15
- * @type string
16
- */
17
- name: string
18
- /**
19
- * 耗时 ms。仅对于表示阶段的指标有效。
20
- * @type number
21
- */
22
- duration: number
23
- /**
24
- * 开始时间,不同指标的具体含义会有差异。
25
- * @type number
26
- */
27
- startTime: number
28
- /**
29
- * 页面路径。仅 render 和 navigation 类型指标有效。
30
- * @type string
31
- */
32
- path: string | null
33
- /**
34
- * 页面跳转来源页面路径。仅 route 指标有效。
35
- * @type string
36
- */
37
- referrerPath: string | null
38
- /**
39
- * path 对应页面实例 Id(随机生成,不保证递增)。仅 render/navigation 指标有效。
40
- * @type number
41
- */
42
- pageId: number | null
43
- /**
44
- * referrerPath对应页面实例 Id(随机生成,不保证递增)。仅 route 指标有效。
45
- * @type number
46
- */
47
- referrerPageId: number | null
48
- /**
49
- * 路由真正响应开始时间。仅 navigation 类型指标有效。
50
- * @type number
51
- */
52
- navigationStart: number | null
53
- /**
54
- * 路由详细类型,与路由方法对应。仅 navigation 类型指标有效。
55
- * @type string
56
- */
57
- navigationType: string | null
58
- /**
59
- * 首次渲染参数在渲染层收到的时间。仅 firstRender 指标有效。
60
- * @type number
61
- */
62
- initDataRecvTime: number | null
63
- /**
64
- * 渲染层执行渲染结束时间。仅 firstRender 指标有效。
65
- * @type number
66
- */
67
- viewLayerRenderEndTime: number | null
68
- }
69
-
70
- export type PerformanceObserverOptions = {
71
- buffered?: boolean
72
- entryTypes?: string[]
73
- type?: string
74
- }
75
-
76
- export interface PerformanceObserver {
77
- /**
78
- * 开始监听
79
- */
80
- observe(options: PerformanceObserverOptions): void
81
- /**
82
- * 停止监听
83
- */
84
- disconnect(): void
85
- }
86
-
87
- export interface PerformanceObserverEntryList {
88
- /**
89
- * 该方法返回当前列表中的所有性能数据
90
- */
91
- getEntries(): PerformanceEntry[]
92
- /**
93
- * 获取当前列表中所有类型为 [entryType] 的性能数据
94
- */
95
- getEntriesByType(entryType: string): PerformanceEntry[]
96
- /**
97
- * 获取当前列表中所有名称为 [name] 且类型为 [entryType] 的性能数据
98
- */
99
- getEntriesByName(name: string, entryType: string): PerformanceEntry[]
100
- }
101
-
102
- export interface Performance {
103
- /**
104
- * 创建全局性能事件监听器
105
- */
106
- createObserver(callback: PerformanceObserverCallback): PerformanceObserver
107
- /**
108
- * 该方法返回当前缓冲区中的所有性能数据
109
- */
110
- getEntries(): PerformanceEntry[]
111
- /**
112
- * 获取当前缓冲区中所有类型为 [entryType] 的性能数据
113
- */
114
- getEntriesByType(entryType: string): PerformanceEntry[]
115
- /**
116
- * 获取当前缓冲区中所有名称为 [name] 且类型为 [entryType] 的性能数据
117
- */
118
- getEntriesByName(name: string, entryType: string): PerformanceEntry[]
119
- /**
120
- * 设置缓冲区大小,默认缓冲 30 条性能数据
121
- */
122
- setBufferSize(size: number): void
123
- }
124
-
125
- export interface Uni {
126
- /**
127
- * 返回一个Performance对象实例
128
- *
129
- * @tutorial-uni-app-x https://doc.dcloud.net.cn/uni-app-x/api/get-performance.html
130
- * @tutorial https://doc.dcloud.net.cn/uni-app-x/api/get-performance.html
131
- * @uniPlatform {
132
- * "app": {
133
- * "android": {
134
- * "osVer": "5.0",
135
- * "uniVer": "x",
136
- * "unixVer": "3.91"
137
- * },
138
- * "ios": {
139
- * "osVer": "12.0",
140
- * "uniVer": "x",
141
- * "unixVer": "4.25"
142
- * },
143
- * "harmony": {
144
- * "osVer": "x",
145
- * "uniVer": "x",
146
- * "unixVer": "x"
147
- * }
148
- * },
149
- * "mp": {
150
- * "weixin": {
151
- * "hostVer": "√",
152
- * "uniVer": "√",
153
- * "unixVer": "4.41"
154
- * },
155
- * "alipay": {
156
- * "hostVer": "√",
157
- * "uniVer": "√",
158
- * "unixVer": "x"
159
- * },
160
- * "baidu": {
161
- * "hostVer": "√",
162
- * "uniVer": "√",
163
- * "unixVer": "x"
164
- * },
165
- * "toutiao": {
166
- * "hostVer": "√",
167
- * "uniVer": "√",
168
- * "unixVer": "x"
169
- * },
170
- * "lark": {
171
- * "hostVer": "√",
172
- * "uniVer": "√",
173
- * "unixVer": "x"
174
- * },
175
- * "qq": {
176
- * "hostVer": "√",
177
- * "uniVer": "√",
178
- * "unixVer": "x"
179
- * },
180
- * "kuaishou": {
181
- * "hostVer": "√",
182
- * "uniVer": "√",
183
- * "unixVer": "x"
184
- * },
185
- * "jd": {
186
- * "hostVer": "√",
187
- * "uniVer": "√",
188
- * "unixVer": "x"
189
- * }
190
- * },
191
- * "web": {
192
- * "uniVer": "x",
193
- * "unixVer": "x"
194
- * }
195
- * }
196
- */
197
- getPerformance: () => Performance
198
- }