@dcloudio/uni-app-x 0.7.62 → 0.7.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types/app.d.ts +36 -1
- package/types/dom2/UniCSSProperty.d.ts +446 -0
- package/types/dom2/UniCSSType.d.ts +72 -0
- package/types/dom2/UniCommon.d.ts +40 -0
- package/types/dom2/UniCustomViewElement.d.ts +12 -0
- package/types/dom2/UniElement.d.ts +354 -0
- package/types/dom2/UniElementType.d.ts +37 -0
- package/types/dom2/UniImageElement.d.ts +102 -0
- package/types/dom2/UniNativeBaseView.d.ts +178 -0
- package/types/dom2/UniNativeCustomView.d.ts +13 -0
- package/types/dom2/UniNativeDefines.d.ts +435 -0
- package/types/dom2/UniNativeImageView.d.ts +34 -0
- package/types/dom2/UniNativeScrollView.d.ts +42 -0
- package/types/dom2/UniNativeTextView.d.ts +25 -0
- package/types/dom2/UniNativeView.d.ts +51 -0
- package/types/dom2/UniNativeViewType.d.ts +22 -0
- package/types/dom2/UniPage.d.ts +55 -0
- package/types/dom2/UniScrollViewElement.d.ts +13 -0
- package/types/dom2/UniTextElement.d.ts +20 -0
- package/types/dom2/UniTextLayout.d.ts +386 -0
- package/types/dom2/UniViewElement.d.ts +57 -0
- package/types/dom2/global.d.ts +189 -0
- package/types/dom2/index.d.ts +40 -0
- package/types/dom2/sharedData.d.ts +227 -0
- package/types/index.d.ts +2 -1
- package/types/native/DOMRect.d.ts +2 -1
- package/types/native/DrawableContext.d.ts +1665 -1661
- package/types/native/IUniElement.d.ts +3514 -2877
- package/types/native/SnapshotOptions.d.ts +2 -2
- package/types/native/UniAnimation.d.ts +11 -10
- package/types/native/UniEvent.d.ts +108 -3
- package/types/native/UniPage.d.ts +891 -887
- package/types/native/UniTextElement.d.ts +37 -0
- package/types/native/UniTextLayout.d.ts +387 -0
- package/types/native/UniVideoElement.d.ts +20 -17
- package/types/native/Worker.d.ts +19 -0
- package/types/native/global.d.ts +28 -68
- package/types/native/index.d.ts +18 -1
- package/types/page.d.ts +1862 -599
- package/types/uni/uts-plugin-api/global.d.ts +2 -0
- package/types/uni/uts-plugin-api/index.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-chooseMedia/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +10 -10
- package/types/uni/uts-plugin-api/lib/uni-createWebviewContext/utssdk/interface.d.ts +0 -1
- package/types/uni/uts-plugin-api/lib/uni-createWorker/utssdk/global.d.ts +22 -0
- package/types/uni/uts-plugin-api/lib/uni-createWorker/utssdk/index.d.ts +10 -0
- package/types/uni/uts-plugin-api/lib/uni-createWorker/utssdk/interface.d.ts +524 -0
- package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +985 -76
- package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +79 -55
- package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +77 -53
- package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +458 -407
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +420 -0
- package/types/uni/uts-plugin-api/lib/uni-location/utssdk/interface.d.ts +80 -80
- package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/global.d.ts +12 -4
- package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/index.d.ts +6 -2
- package/types/uni/uts-plugin-api/lib/uni-modal/utssdk/interface.d.ts +713 -91
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/interface.d.ts +3 -3
- package/types/uni/uts-plugin-api/lib/uni-oauth-weixin/utssdk/interface.d.ts +3 -1
- package/types/uni/uts-plugin-api/lib/uni-recorder/utssdk/interface.d.ts +71 -1
- package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-screenBrightness/utssdk/global.d.ts +56 -0
- package/types/uni/uts-plugin-api/lib/uni-screenBrightness/utssdk/index.d.ts +27 -0
- package/types/uni/uts-plugin-api/lib/uni-screenBrightness/utssdk/interface.d.ts +842 -0
- package/types/uni/uts-plugin-api/lib/uni-share/utssdk/interface.d.ts +11 -11
- package/types/uni/uts-plugin-api/lib/uni-share-weixin/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +63 -42
- package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-biz/lib/uni-facialVerify/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-biz/lib/uni-live-player/utssdk/global.d.ts +4 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-player/utssdk/index.d.ts +2 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-player/utssdk/interface.d.ts +1007 -314
- package/types/uni/uts-plugin-biz/lib/uni-live-pusher/utssdk/global.d.ts +4 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-pusher/utssdk/index.d.ts +2 -0
- package/types/uni/uts-plugin-biz/lib/uni-live-pusher/utssdk/interface.d.ts +1727 -10
- package/types/uni/uts-plugin-component/lib/uni-camera/utssdk/interface.d.ts +235 -30
- package/types/uni/uts-plugin-component/lib/uni-canvas/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +17 -17
- package/uts-plugin.d.ts +11 -0
|
@@ -1,243 +1,245 @@
|
|
|
1
|
-
export interface Uni {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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": "1.9.6",
|
|
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
84
|
* @tutorial_weixin https://developers.weixin.qq.com/miniprogram/dev/api/device/network/wx.getNetworkType.html
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
85
|
+
*/
|
|
86
|
+
getNetworkType(options : GetNetworkTypeOptions) : void;
|
|
87
|
+
/**
|
|
88
|
+
* 监听网络状态变化
|
|
89
|
+
*
|
|
90
|
+
* @tutorial_uni_app https://uniapp.dcloud.net.cn/api/system/network.html#onnetworkstatuschange
|
|
91
|
+
* @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/network-status-change.html
|
|
92
|
+
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/network-status-change.html
|
|
93
|
+
* @uniPlatform {
|
|
94
|
+
* "app": {
|
|
95
|
+
* "android": {
|
|
96
|
+
* "osVer": "5.0",
|
|
97
|
+
* "uniVer": "√",
|
|
98
|
+
* "unixVer": "4.81"
|
|
99
|
+
* },
|
|
100
|
+
* "ios": {
|
|
101
|
+
* "osVer": "12.0",
|
|
102
|
+
* "uniVer": "√",
|
|
103
|
+
* "unixVer": "4.81",
|
|
104
|
+
* "unixUtsPlugin": "4.81"
|
|
105
|
+
* },
|
|
106
|
+
* "harmony": {
|
|
107
|
+
* "osVer": "3.0",
|
|
108
|
+
* "uniVer": "4.24",
|
|
109
|
+
* "unixVer": "4.61"
|
|
110
|
+
* }
|
|
111
|
+
* },
|
|
112
|
+
* "mp": {
|
|
113
|
+
* "weixin": {
|
|
114
|
+
* "hostVer": "1.1.0",
|
|
115
|
+
* "uniVer": "√",
|
|
116
|
+
* "unixVer": "4.41"
|
|
117
|
+
* },
|
|
118
|
+
* "alipay": {
|
|
119
|
+
* "hostVer": "√",
|
|
120
|
+
* "uniVer": "√",
|
|
121
|
+
* "unixVer": "x"
|
|
122
|
+
* },
|
|
123
|
+
* "baidu": {
|
|
124
|
+
* "hostVer": "√",
|
|
125
|
+
* "uniVer": "√",
|
|
126
|
+
* "unixVer": "x"
|
|
127
|
+
* },
|
|
128
|
+
* "toutiao": {
|
|
129
|
+
* "hostVer": "√",
|
|
130
|
+
* "uniVer": "√",
|
|
131
|
+
* "unixVer": "x"
|
|
132
|
+
* },
|
|
133
|
+
* "lark": {
|
|
134
|
+
* "hostVer": "√",
|
|
135
|
+
* "uniVer": "√",
|
|
136
|
+
* "unixVer": "x"
|
|
137
|
+
* },
|
|
138
|
+
* "qq": {
|
|
139
|
+
* "hostVer": "√",
|
|
140
|
+
* "uniVer": "√",
|
|
141
|
+
* "unixVer": "x"
|
|
142
|
+
* },
|
|
143
|
+
* "kuaishou": {
|
|
144
|
+
* "hostVer": "√",
|
|
145
|
+
* "uniVer": "√",
|
|
146
|
+
* "unixVer": "x"
|
|
147
|
+
* },
|
|
148
|
+
* "jd": {
|
|
149
|
+
* "hostVer": "√",
|
|
150
|
+
* "uniVer": "√",
|
|
151
|
+
* "unixVer": "x"
|
|
152
|
+
* }
|
|
153
|
+
* },
|
|
154
|
+
* "web": {
|
|
155
|
+
* "uniVer": "√",
|
|
156
|
+
* "unixVer": "4.0"
|
|
157
|
+
* }
|
|
158
|
+
* }
|
|
158
159
|
* @tutorial_weixin https://developers.weixin.qq.com/miniprogram/dev/api/device/network/wx.onNetworkStatusChange.html
|
|
159
|
-
*/
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
160
|
+
*/
|
|
161
|
+
onNetworkStatusChange(listener : OnNetworkStatusChangeCallback) : number;
|
|
162
|
+
/**
|
|
163
|
+
* 取消监听网络状态变化
|
|
164
|
+
*
|
|
165
|
+
* @tutorial_uni_app https://uniapp.dcloud.net.cn/api/system/network.html#offnetworkstatuschange
|
|
166
|
+
* @tutorial_uni_app_x https://doc.dcloud.net.cn/uni-app-x/api/network-status-change.html
|
|
167
|
+
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/network-status-change.html
|
|
168
|
+
* @uniPlatform {
|
|
169
|
+
* "app": {
|
|
170
|
+
* "android": {
|
|
171
|
+
* "osVer": "5.0",
|
|
172
|
+
* "uniVer": "√",
|
|
173
|
+
* "unixVer": "4.81"
|
|
174
|
+
* },
|
|
175
|
+
* "ios": {
|
|
176
|
+
* "osVer": "12.0",
|
|
177
|
+
* "uniVer": "√",
|
|
178
|
+
* "unixVer": "4.81",
|
|
179
|
+
* "unixUtsPlugin": "4.81"
|
|
180
|
+
* },
|
|
181
|
+
* "harmony": {
|
|
182
|
+
* "osVer": "3.0",
|
|
183
|
+
* "uniVer": "4.24",
|
|
184
|
+
* "unixVer": "4.61"
|
|
185
|
+
* }
|
|
186
|
+
* },
|
|
187
|
+
* "mp": {
|
|
188
|
+
* "weixin": {
|
|
189
|
+
* "hostVer": "2.9.3",
|
|
190
|
+
* "uniVer": "√",
|
|
191
|
+
* "unixVer": "4.41"
|
|
192
|
+
* },
|
|
193
|
+
* "alipay": {
|
|
194
|
+
* "hostVer": "√",
|
|
195
|
+
* "uniVer": "√",
|
|
196
|
+
* "unixVer": "x"
|
|
197
|
+
* },
|
|
198
|
+
* "baidu": {
|
|
199
|
+
* "hostVer": "√",
|
|
200
|
+
* "uniVer": "√",
|
|
201
|
+
* "unixVer": "x"
|
|
202
|
+
* },
|
|
203
|
+
* "toutiao": {
|
|
204
|
+
* "hostVer": "√",
|
|
205
|
+
* "uniVer": "√",
|
|
206
|
+
* "unixVer": "x"
|
|
207
|
+
* },
|
|
208
|
+
* "lark": {
|
|
209
|
+
* "hostVer": "√",
|
|
210
|
+
* "uniVer": "√",
|
|
211
|
+
* "unixVer": "x"
|
|
212
|
+
* },
|
|
213
|
+
* "qq": {
|
|
214
|
+
* "hostVer": "√",
|
|
215
|
+
* "uniVer": "√",
|
|
216
|
+
* "unixVer": "x"
|
|
217
|
+
* },
|
|
218
|
+
* "kuaishou": {
|
|
219
|
+
* "hostVer": "√",
|
|
220
|
+
* "uniVer": "√",
|
|
221
|
+
* "unixVer": "x"
|
|
222
|
+
* },
|
|
223
|
+
* "jd": {
|
|
224
|
+
* "hostVer": "√",
|
|
225
|
+
* "uniVer": "√",
|
|
226
|
+
* "unixVer": "x"
|
|
227
|
+
* }
|
|
228
|
+
* },
|
|
229
|
+
* "web": {
|
|
230
|
+
* "uniVer": "√",
|
|
231
|
+
* "unixVer": "4.0"
|
|
232
|
+
* }
|
|
233
|
+
* }
|
|
232
234
|
* @tutorial_weixin https://developers.weixin.qq.com/miniprogram/dev/api/device/network/wx.offNetworkStatusChange.html
|
|
233
|
-
*/
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export type GetNetworkType = (options: GetNetworkTypeOptions) => void;
|
|
238
|
-
export type GetNetworkTypeSuccess = {
|
|
239
|
-
|
|
240
|
-
|
|
235
|
+
*/
|
|
236
|
+
offNetworkStatusChange(listener ?: number | OnNetworkStatusChangeCallback | null) : void;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export type GetNetworkType = (options : GetNetworkTypeOptions) => void;
|
|
240
|
+
export type GetNetworkTypeSuccess = {
|
|
241
|
+
/**
|
|
242
|
+
* 网络类型
|
|
241
243
|
* @uniPlatform {
|
|
242
244
|
* "mp": {
|
|
243
245
|
* "weixin": {
|
|
@@ -282,8 +284,8 @@ export type GetNetworkTypeSuccess = {
|
|
|
282
284
|
* }
|
|
283
285
|
* }
|
|
284
286
|
* }
|
|
285
|
-
*/
|
|
286
|
-
|
|
287
|
+
*/
|
|
288
|
+
networkType : string
|
|
287
289
|
/**
|
|
288
290
|
* 需要基础库: `2.22.1`
|
|
289
291
|
*
|
|
@@ -435,65 +437,16 @@ export type GetNetworkTypeSuccess = {
|
|
|
435
437
|
* }
|
|
436
438
|
*/
|
|
437
439
|
weakNet?: boolean | null;
|
|
438
|
-
};
|
|
439
|
-
export type GetNetworkTypeSuccessCallback = (result: GetNetworkTypeSuccess) => void;
|
|
440
|
-
export type GetNetworkTypeFail = UniError;
|
|
441
|
-
export type GetNetworkTypeFailCallback = (result: GetNetworkTypeFail) => void;
|
|
442
|
-
export type GetNetworkTypeComplete = any;
|
|
443
|
-
export type GetNetworkTypeCompleteCallback = (result: GetNetworkTypeComplete) => void;
|
|
444
|
-
export type GetNetworkTypeOptions = {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
* @uniPlatform {
|
|
449
|
-
* "mp": {
|
|
450
|
-
* "weixin": {
|
|
451
|
-
* "hostVer": "√",
|
|
452
|
-
* "uniVer": "√",
|
|
453
|
-
* "unixVer": "4.41"
|
|
454
|
-
* },
|
|
455
|
-
* "alipay": {
|
|
456
|
-
* "hostVer": "-",
|
|
457
|
-
* "uniVer": "-",
|
|
458
|
-
* "unixVer": "-"
|
|
459
|
-
* },
|
|
460
|
-
* "baidu": {
|
|
461
|
-
* "hostVer": "-",
|
|
462
|
-
* "uniVer": "-",
|
|
463
|
-
* "unixVer": "-"
|
|
464
|
-
* },
|
|
465
|
-
* "toutiao": {
|
|
466
|
-
* "hostVer": "-",
|
|
467
|
-
* "uniVer": "-",
|
|
468
|
-
* "unixVer": "-"
|
|
469
|
-
* },
|
|
470
|
-
* "lark": {
|
|
471
|
-
* "hostVer": "-",
|
|
472
|
-
* "uniVer": "-",
|
|
473
|
-
* "unixVer": "-"
|
|
474
|
-
* },
|
|
475
|
-
* "qq": {
|
|
476
|
-
* "hostVer": "-",
|
|
477
|
-
* "uniVer": "-",
|
|
478
|
-
* "unixVer": "-"
|
|
479
|
-
* },
|
|
480
|
-
* "kuaishou": {
|
|
481
|
-
* "hostVer": "-",
|
|
482
|
-
* "uniVer": "-",
|
|
483
|
-
* "unixVer": "-"
|
|
484
|
-
* },
|
|
485
|
-
* "jd": {
|
|
486
|
-
* "hostVer": "-",
|
|
487
|
-
* "uniVer": "-",
|
|
488
|
-
* "unixVer": "-"
|
|
489
|
-
* }
|
|
490
|
-
* }
|
|
491
|
-
* }
|
|
492
|
-
*/
|
|
493
|
-
success?: GetNetworkTypeSuccessCallback | null,
|
|
494
|
-
/**
|
|
495
|
-
* 接口调用失败的回调函数
|
|
496
|
-
* @defaultValue null
|
|
440
|
+
};
|
|
441
|
+
export type GetNetworkTypeSuccessCallback = (result : GetNetworkTypeSuccess) => void;
|
|
442
|
+
export type GetNetworkTypeFail = UniError;
|
|
443
|
+
export type GetNetworkTypeFailCallback = (result : GetNetworkTypeFail) => void;
|
|
444
|
+
export type GetNetworkTypeComplete = any;
|
|
445
|
+
export type GetNetworkTypeCompleteCallback = (result : GetNetworkTypeComplete) => void;
|
|
446
|
+
export type GetNetworkTypeOptions = {
|
|
447
|
+
/**
|
|
448
|
+
* 接口调用成功的回调函数
|
|
449
|
+
* @defaultValue null
|
|
497
450
|
* @uniPlatform {
|
|
498
451
|
* "mp": {
|
|
499
452
|
* "weixin": {
|
|
@@ -538,11 +491,11 @@ export type GetNetworkTypeOptions = {
|
|
|
538
491
|
* }
|
|
539
492
|
* }
|
|
540
493
|
* }
|
|
541
|
-
*/
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
494
|
+
*/
|
|
495
|
+
success ?: GetNetworkTypeSuccessCallback | null,
|
|
496
|
+
/**
|
|
497
|
+
* 接口调用失败的回调函数
|
|
498
|
+
* @defaultValue null
|
|
546
499
|
* @uniPlatform {
|
|
547
500
|
* "mp": {
|
|
548
501
|
* "weixin": {
|
|
@@ -587,108 +540,206 @@ export type GetNetworkTypeOptions = {
|
|
|
587
540
|
* }
|
|
588
541
|
* }
|
|
589
542
|
* }
|
|
590
|
-
*/
|
|
591
|
-
|
|
592
|
-
|
|
543
|
+
*/
|
|
544
|
+
fail ?: GetNetworkTypeFailCallback | null,
|
|
545
|
+
/**
|
|
546
|
+
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
|
547
|
+
* @defaultValue null
|
|
548
|
+
* @uniPlatform {
|
|
549
|
+
* "mp": {
|
|
550
|
+
* "weixin": {
|
|
551
|
+
* "hostVer": "√",
|
|
552
|
+
* "uniVer": "√",
|
|
553
|
+
* "unixVer": "4.41"
|
|
554
|
+
* },
|
|
555
|
+
* "alipay": {
|
|
556
|
+
* "hostVer": "-",
|
|
557
|
+
* "uniVer": "-",
|
|
558
|
+
* "unixVer": "-"
|
|
559
|
+
* },
|
|
560
|
+
* "baidu": {
|
|
561
|
+
* "hostVer": "-",
|
|
562
|
+
* "uniVer": "-",
|
|
563
|
+
* "unixVer": "-"
|
|
564
|
+
* },
|
|
565
|
+
* "toutiao": {
|
|
566
|
+
* "hostVer": "-",
|
|
567
|
+
* "uniVer": "-",
|
|
568
|
+
* "unixVer": "-"
|
|
569
|
+
* },
|
|
570
|
+
* "lark": {
|
|
571
|
+
* "hostVer": "-",
|
|
572
|
+
* "uniVer": "-",
|
|
573
|
+
* "unixVer": "-"
|
|
574
|
+
* },
|
|
575
|
+
* "qq": {
|
|
576
|
+
* "hostVer": "-",
|
|
577
|
+
* "uniVer": "-",
|
|
578
|
+
* "unixVer": "-"
|
|
579
|
+
* },
|
|
580
|
+
* "kuaishou": {
|
|
581
|
+
* "hostVer": "-",
|
|
582
|
+
* "uniVer": "-",
|
|
583
|
+
* "unixVer": "-"
|
|
584
|
+
* },
|
|
585
|
+
* "jd": {
|
|
586
|
+
* "hostVer": "-",
|
|
587
|
+
* "uniVer": "-",
|
|
588
|
+
* "unixVer": "-"
|
|
589
|
+
* }
|
|
590
|
+
* }
|
|
591
|
+
* }
|
|
592
|
+
*/
|
|
593
|
+
complete ?: GetNetworkTypeCompleteCallback | null
|
|
594
|
+
};
|
|
593
595
|
export type OnNetworkStatusChangeCallbackResult = {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
*
|
|
619
|
-
*
|
|
620
|
-
*
|
|
621
|
-
*
|
|
622
|
-
*
|
|
623
|
-
*
|
|
624
|
-
*
|
|
625
|
-
*
|
|
626
|
-
*
|
|
627
|
-
*
|
|
628
|
-
*
|
|
629
|
-
*
|
|
630
|
-
*
|
|
631
|
-
*
|
|
632
|
-
*
|
|
633
|
-
*
|
|
634
|
-
*
|
|
635
|
-
*
|
|
636
|
-
*
|
|
637
|
-
*
|
|
638
|
-
*
|
|
639
|
-
*
|
|
640
|
-
*
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
647
|
-
*
|
|
648
|
-
*
|
|
649
|
-
*
|
|
650
|
-
*
|
|
651
|
-
*
|
|
652
|
-
*
|
|
653
|
-
*
|
|
654
|
-
*
|
|
655
|
-
*
|
|
656
|
-
*
|
|
657
|
-
*
|
|
658
|
-
*
|
|
659
|
-
*
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
596
|
+
/**
|
|
597
|
+
* 当前是否有网络连接
|
|
598
|
+
*
|
|
599
|
+
* @type boolean
|
|
600
|
+
* @uniPlatform {
|
|
601
|
+
* "app": {
|
|
602
|
+
* "android": {
|
|
603
|
+
* "osVer": "5.0",
|
|
604
|
+
* "uniVer": "√",
|
|
605
|
+
* "unixVer": "4.81"
|
|
606
|
+
* "unixUtsPlugin": "4.81"
|
|
607
|
+
* },
|
|
608
|
+
* "ios": {
|
|
609
|
+
* "osVer": "12.0",
|
|
610
|
+
* "uniVer": "√",
|
|
611
|
+
* "unixVer": "4.81",
|
|
612
|
+
* "unixUtsPlugin": "4.81"
|
|
613
|
+
* },
|
|
614
|
+
* "harmony": {
|
|
615
|
+
* "osVer": "3.0",
|
|
616
|
+
* "uniVer": "4.24",
|
|
617
|
+
* "unixVer": "4.61"
|
|
618
|
+
* }
|
|
619
|
+
* },
|
|
620
|
+
* "mp": {
|
|
621
|
+
* "weixin": {
|
|
622
|
+
* "hostVer": "√",
|
|
623
|
+
* "uniVer": "√",
|
|
624
|
+
* "unixVer": "4.41"
|
|
625
|
+
* },
|
|
626
|
+
* "alipay": {
|
|
627
|
+
* "hostVer": "√",
|
|
628
|
+
* "uniVer": "√",
|
|
629
|
+
* "unixVer": "x"
|
|
630
|
+
* },
|
|
631
|
+
* "baidu": {
|
|
632
|
+
* "hostVer": "√",
|
|
633
|
+
* "uniVer": "√",
|
|
634
|
+
* "unixVer": "x"
|
|
635
|
+
* },
|
|
636
|
+
* "toutiao": {
|
|
637
|
+
* "hostVer": "√",
|
|
638
|
+
* "uniVer": "√",
|
|
639
|
+
* "unixVer": "x"
|
|
640
|
+
* },
|
|
641
|
+
* "lark": {
|
|
642
|
+
* "hostVer": "√",
|
|
643
|
+
* "uniVer": "√",
|
|
644
|
+
* "unixVer": "x"
|
|
645
|
+
* },
|
|
646
|
+
* "qq": {
|
|
647
|
+
* "hostVer": "√",
|
|
648
|
+
* "uniVer": "√",
|
|
649
|
+
* "unixVer": "x"
|
|
650
|
+
* },
|
|
651
|
+
* "kuaishou": {
|
|
652
|
+
* "hostVer": "√",
|
|
653
|
+
* "uniVer": "√",
|
|
654
|
+
* "unixVer": "x"
|
|
655
|
+
* },
|
|
656
|
+
* "jd": {
|
|
657
|
+
* "hostVer": "√",
|
|
658
|
+
* "uniVer": "√",
|
|
659
|
+
* "unixVer": "x"
|
|
660
|
+
* }
|
|
661
|
+
* },
|
|
662
|
+
* "web": {
|
|
663
|
+
* "uniVer": "√",
|
|
664
|
+
* "unixVer": "4.0"
|
|
665
|
+
* }
|
|
666
|
+
* }
|
|
667
|
+
*/
|
|
668
|
+
isConnected : boolean,
|
|
669
|
+
/**
|
|
670
|
+
* 网络类型(wifi、2g、3g、4g、5g、unknown、none)
|
|
671
|
+
*
|
|
672
|
+
* @type boolean
|
|
673
|
+
* @uniPlatform {
|
|
674
|
+
* "app": {
|
|
675
|
+
* "android": {
|
|
676
|
+
* "osVer": "5.0",
|
|
677
|
+
* "uniVer": "√",
|
|
678
|
+
* "unixVer": "4.81"
|
|
679
|
+
* "unixUtsPlugin": "4.81"
|
|
680
|
+
* },
|
|
681
|
+
* "ios": {
|
|
682
|
+
* "osVer": "12.0",
|
|
683
|
+
* "uniVer": "√",
|
|
684
|
+
* "unixVer": "4.81",
|
|
685
|
+
* "unixUtsPlugin": "4.81"
|
|
686
|
+
* },
|
|
687
|
+
* "harmony": {
|
|
688
|
+
* "osVer": "3.0",
|
|
689
|
+
* "uniVer": "4.24",
|
|
690
|
+
* "unixVer": "4.61"
|
|
691
|
+
* }
|
|
692
|
+
* },
|
|
693
|
+
* "mp": {
|
|
694
|
+
* "weixin": {
|
|
695
|
+
* "hostVer": "√",
|
|
696
|
+
* "uniVer": "√",
|
|
697
|
+
* "unixVer": "4.41"
|
|
698
|
+
* },
|
|
699
|
+
* "alipay": {
|
|
700
|
+
* "hostVer": "√",
|
|
701
|
+
* "uniVer": "√",
|
|
702
|
+
* "unixVer": "x"
|
|
703
|
+
* },
|
|
704
|
+
* "baidu": {
|
|
705
|
+
* "hostVer": "√",
|
|
706
|
+
* "uniVer": "√",
|
|
707
|
+
* "unixVer": "x"
|
|
708
|
+
* },
|
|
709
|
+
* "toutiao": {
|
|
710
|
+
* "hostVer": "√",
|
|
711
|
+
* "uniVer": "√",
|
|
712
|
+
* "unixVer": "x"
|
|
713
|
+
* },
|
|
714
|
+
* "lark": {
|
|
715
|
+
* "hostVer": "√",
|
|
716
|
+
* "uniVer": "√",
|
|
717
|
+
* "unixVer": "x"
|
|
718
|
+
* },
|
|
719
|
+
* "qq": {
|
|
720
|
+
* "hostVer": "√",
|
|
721
|
+
* "uniVer": "√",
|
|
722
|
+
* "unixVer": "x"
|
|
723
|
+
* },
|
|
724
|
+
* "kuaishou": {
|
|
725
|
+
* "hostVer": "√",
|
|
726
|
+
* "uniVer": "√",
|
|
727
|
+
* "unixVer": "x"
|
|
728
|
+
* },
|
|
729
|
+
* "jd": {
|
|
730
|
+
* "hostVer": "√",
|
|
731
|
+
* "uniVer": "√",
|
|
732
|
+
* "unixVer": "x"
|
|
733
|
+
* }
|
|
734
|
+
* },
|
|
735
|
+
* "web": {
|
|
736
|
+
* "uniVer": "√",
|
|
737
|
+
* "unixVer": "4.0"
|
|
738
|
+
* }
|
|
739
|
+
* }
|
|
740
|
+
*/
|
|
741
|
+
networkType : string
|
|
742
|
+
};
|
|
743
|
+
export type OnNetworkStatusChangeCallback = (result : OnNetworkStatusChangeCallbackResult) => void;
|
|
744
|
+
export type OnNetworkStatusChange = (listener : OnNetworkStatusChangeCallback) => number;
|
|
745
|
+
export type OffNetworkStatusChange = (listener ?: number | OnNetworkStatusChangeCallback | null) => void;
|