@dcloudio/uni-app-x 0.7.38 → 0.7.39
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/UniPage.d.ts +4 -0
- package/types/native/CanvasRenderingContext2D.d.ts +1 -1
- package/types/native/IUniElement.d.ts +105 -44
- package/types/native/global.d.ts +14 -8
- package/types/page.d.ts +45 -3
- package/types/uni/env/index.d.ts +81 -81
- package/types/uni/uni-map-tencent-map.d.ts +7 -7
- package/types/uni/uts-plugin-api/global.d.ts +0 -2
- package/types/uni/uts-plugin-api/index.d.ts +0 -2
- package/types/uni/uts-plugin-api/lib/uni-addPhoneContact/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-arrayBufferToBase64/utssdk/interface.d.ts +73 -73
- package/types/uni/uts-plugin-api/lib/uni-authentication/utssdk/interface.d.ts +331 -331
- package/types/uni/uts-plugin-api/lib/uni-base64ToArrayBuffer/utssdk/interface.d.ts +73 -73
- package/types/uni/uts-plugin-api/lib/uni-canvas/utssdk/interface.d.ts +628 -628
- package/types/uni/uts-plugin-api/lib/uni-chooseLocation/utssdk/interface.d.ts +414 -153
- package/types/uni/uts-plugin-api/lib/uni-clipboard/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +1218 -1987
- package/types/uni/uts-plugin-api/lib/uni-createIntersectionObserver/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-createSelectorQuery/utssdk/interface.d.ts +6 -6
- package/types/uni/uts-plugin-api/lib/uni-dialogPage/utssdk/interface.d.ts +156 -81
- package/types/uni/uts-plugin-api/lib/uni-event/utssdk/interface.d.ts +315 -315
- package/types/uni/uts-plugin-api/lib/uni-file/utssdk/interface.d.ts +5 -5
- package/types/uni/uts-plugin-api/lib/uni-fileSystemManager/utssdk/interface.d.ts +2530 -2126
- package/types/uni/uts-plugin-api/lib/uni-getAppAuthorizeSetting/utssdk/interface.d.ts +490 -490
- package/types/uni/uts-plugin-api/lib/uni-getAppBaseInfo/utssdk/interface.d.ts +2138 -2005
- package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/global.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/index.d.ts +2 -0
- package/types/uni/uts-plugin-api/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +663 -113
- package/types/uni/uts-plugin-api/lib/uni-getDeviceInfo/utssdk/interface.d.ts +20 -20
- package/types/uni/uts-plugin-api/lib/uni-getElementById/utssdk/interface.d.ts +3 -3
- package/types/uni/uts-plugin-api/lib/uni-getEnterOptionsSync/utssdk/interface.d.ts +217 -217
- package/types/uni/uts-plugin-api/lib/uni-getLaunchOptionsSync/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-getLocation/utssdk/interface.d.ts +809 -809
- package/types/uni/uts-plugin-api/lib/uni-getNetworkType/utssdk/interface.d.ts +274 -274
- package/types/uni/uts-plugin-api/lib/uni-getPerformance/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-getRecorderManager/utssdk/interface.d.ts +969 -969
- package/types/uni/uts-plugin-api/lib/uni-getSystemInfo/utssdk/interface.d.ts +106 -106
- package/types/uni/uts-plugin-api/lib/uni-getSystemSetting/utssdk/interface.d.ts +23 -23
- package/types/uni/uts-plugin-api/lib/uni-interceptor/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-keyboard/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-loadFontFace/utssdk/interface.d.ts +41 -41
- package/types/uni/uts-plugin-api/lib/uni-makePhoneCall/utssdk/interface.d.ts +88 -88
- package/types/uni/uts-plugin-api/lib/uni-media/utssdk/interface.d.ts +1680 -1528
- package/types/uni/uts-plugin-api/lib/uni-navigationBar/utssdk/interface.d.ts +16 -16
- package/types/uni/uts-plugin-api/lib/uni-network/utssdk/interface.d.ts +3620 -3618
- package/types/uni/uts-plugin-api/lib/uni-oauth/utssdk/interface.d.ts +12 -12
- package/types/uni/uts-plugin-api/lib/uni-openDocument/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-pageScrollTo/utssdk/interface.d.ts +3 -3
- package/types/uni/uts-plugin-api/lib/uni-payment/utssdk/interface.d.ts +621 -621
- package/types/uni/uts-plugin-api/lib/uni-privacy/utssdk/interface.d.ts +22 -22
- package/types/uni/uts-plugin-api/lib/uni-prompt/utssdk/interface.d.ts +2602 -2391
- package/types/uni/uts-plugin-api/lib/uni-pullDownRefresh/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-api/lib/uni-route/utssdk/interface.d.ts +26 -26
- package/types/uni/uts-plugin-api/lib/uni-rpx2px/utssdk/interface.d.ts +77 -77
- package/types/uni/uts-plugin-api/lib/uni-scanCode/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-api/lib/uni-storage/utssdk/interface.d.ts +857 -857
- package/types/uni/uts-plugin-api/lib/uni-tabBar/utssdk/interface.d.ts +17 -17
- package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/global.d.ts +8 -0
- package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/index.d.ts +4 -0
- package/types/uni/uts-plugin-api/lib/uni-theme/utssdk/interface.d.ts +1057 -516
- package/types/uni/uts-plugin-api/lib/uni-virtualPayment/utssdk/interface.d.ts +1660 -1660
- package/types/uni/uts-plugin-api/lib/uni-websocket/utssdk/interface.d.ts +1746 -1746
- package/types/uni/uts-plugin-biz/global.d.ts +1 -0
- package/types/uni/uts-plugin-biz/index.d.ts +1 -0
- package/types/uni/uts-plugin-biz/lib/uni-ad/utssdk/interface.d.ts +84 -0
- package/types/uni/{uts-plugin-api → uts-plugin-biz}/lib/uni-crash/utssdk/interface.d.ts +46 -46
- package/types/uni/uts-plugin-biz/lib/uni-map-tencent/utssdk/interface.d.ts +72 -20
- package/types/uni/uts-plugin-biz/lib/uni-push/utssdk/interface.d.ts +126 -0
- package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/global.d.ts +2 -0
- package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/index.d.ts +1 -0
- package/types/uni/uts-plugin-biz/lib/uni-verify/utssdk/interface.d.ts +63 -12
- package/types/uni/uts-plugin-component/lib/uni-video/utssdk/interface.d.ts +308 -308
- package/types/uni/uts-plugin-extend/global.d.ts +1 -0
- package/types/uni/uts-plugin-extend/lib/uni-__f__/utssdk/global.d.ts +7 -0
- package/types/uni/uts-plugin-extend/lib/uni-__f__/utssdk/index.d.ts +0 -0
- package/types/uni/uts-plugin-extend/lib/uni-__f__/utssdk/interface.d.ts +3 -0
- package/types/uni/uts-plugin-extend/lib/uni-accelerometer/utssdk/interface.d.ts +4 -4
- package/types/uni/uts-plugin-extend/lib/uni-canvas/utssdk/interface.d.ts +5 -5
- package/types/uni/uts-plugin-extend/lib/uni-compass/utssdk/interface.d.ts +1 -1
- package/types/uni/uts-plugin-extend/lib/uni-createMediaQueryObserver/utssdk/interface.d.ts +77 -77
- package/types/uni/uts-plugin-extend/lib/uni-getBackgroundAudioManager/utssdk/interface.d.ts +11 -11
- package/types/uni/uts-plugin-extend/lib/uni-locale/utssdk/interface.d.ts +3 -3
- package/types/uni/uts-plugin-extend/lib/uni-localeChange/utssdk/interface.d.ts +6 -6
- package/types/uni/uts-plugin-extend/lib/uni-memory/utssdk/interface.d.ts +2 -2
- package/types/uni/uts-plugin-extend/lib/uni-openLocation/utssdk/interface.d.ts +1 -1
- package/types/uni-cloud/interface.d.ts +13 -13
- package/types/uni/uts-plugin-api/lib/uni-actionSheet/utssdk/global.d.ts +0 -24
- package/types/uni/uts-plugin-api/lib/uni-actionSheet/utssdk/index.d.ts +0 -11
- package/types/uni/uts-plugin-api/lib/uni-actionSheet/utssdk/interface.d.ts +0 -217
- package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/global.d.ts +0 -21
- package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/index.d.ts +0 -9
- package/types/uni/uts-plugin-extend/lib/uni-chooseLocation/utssdk/interface.d.ts +0 -151
- package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/global.d.ts +0 -11
- package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/index.d.ts +0 -4
- package/types/uni/uts-plugin-extend/lib/uni-createInnerAudioContext/utssdk/interface.d.ts +0 -224
- package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/global.d.ts +0 -53
- package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/index.d.ts +0 -25
- package/types/uni/uts-plugin-extend/lib/uni-createMapContext/utssdk/interface.d.ts +0 -487
- package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/global.d.ts +0 -9
- package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/index.d.ts +0 -1
- package/types/uni/uts-plugin-extend/lib/uni-theme/utssdk/interface.d.ts +0 -165
- /package/types/uni/{uts-plugin-api → uts-plugin-biz}/lib/uni-crash/utssdk/global.d.ts +0 -0
- /package/types/uni/{uts-plugin-api → uts-plugin-biz}/lib/uni-crash/utssdk/index.d.ts +0 -0
|
@@ -1,153 +1,414 @@
|
|
|
1
|
-
/**
|
|
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
|
-
|
|
84
|
-
|
|
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
|
-
|
|
1
|
+
/**
|
|
2
|
+
* 错误码
|
|
3
|
+
*/
|
|
4
|
+
export type ChooseLocationErrorCode =
|
|
5
|
+
/**
|
|
6
|
+
* 取消
|
|
7
|
+
* @uniPlatform {
|
|
8
|
+
* "app": {
|
|
9
|
+
* "android": {
|
|
10
|
+
* "osVer": "5.0",
|
|
11
|
+
* "uniVer": "√",
|
|
12
|
+
* "unixVer": "4.34"
|
|
13
|
+
* },
|
|
14
|
+
* "ios": {
|
|
15
|
+
* "osVer": "12.0",
|
|
16
|
+
* "uniVer": "√",
|
|
17
|
+
* "unixVer": "4.34"
|
|
18
|
+
* },
|
|
19
|
+
* "harmony": {
|
|
20
|
+
* "osVer": "3.0",
|
|
21
|
+
* "uniVer": "x",
|
|
22
|
+
* "unixVer": "x"
|
|
23
|
+
* }
|
|
24
|
+
* },
|
|
25
|
+
* "web": {
|
|
26
|
+
* "uniVer": "√",
|
|
27
|
+
* "unixVer": "4.34"
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
*/
|
|
31
|
+
1 |
|
|
32
|
+
/**
|
|
33
|
+
* 框架内部错误
|
|
34
|
+
* @uniPlatform {
|
|
35
|
+
* "app": {
|
|
36
|
+
* "android": {
|
|
37
|
+
* "osVer": "5.0",
|
|
38
|
+
* "uniVer": "√",
|
|
39
|
+
* "unixVer": "4.34"
|
|
40
|
+
* },
|
|
41
|
+
* "ios": {
|
|
42
|
+
* "osVer": "12.0",
|
|
43
|
+
* "uniVer": "√",
|
|
44
|
+
* "unixVer": "4.34"
|
|
45
|
+
* },
|
|
46
|
+
* "harmony": {
|
|
47
|
+
* "osVer": "3.0",
|
|
48
|
+
* "uniVer": "x",
|
|
49
|
+
* "unixVer": "x"
|
|
50
|
+
* }
|
|
51
|
+
* },
|
|
52
|
+
* "web": {
|
|
53
|
+
* "uniVer": "√",
|
|
54
|
+
* "unixVer": "4.34"
|
|
55
|
+
* }
|
|
56
|
+
* }
|
|
57
|
+
*/
|
|
58
|
+
4;
|
|
59
|
+
|
|
60
|
+
export interface ChooseLocationSuccess extends AsyncApiSuccessResult {
|
|
61
|
+
name: string,
|
|
62
|
+
address: string,
|
|
63
|
+
latitude: number,
|
|
64
|
+
longitude: number
|
|
65
|
+
}
|
|
66
|
+
type ChooseLocationSuccessCallback = (result: ChooseLocationSuccess) => void
|
|
67
|
+
|
|
68
|
+
export interface ChooseLocationFail extends IUniError {
|
|
69
|
+
errCode: ChooseLocationErrorCode
|
|
70
|
+
}
|
|
71
|
+
type ChooseLocationFailCallback = (result: ChooseLocationFail) => void
|
|
72
|
+
|
|
73
|
+
export type ChooseLocationComplete = AsyncApiResult
|
|
74
|
+
type ChooseLocationCompleteCallback = (result: ChooseLocationComplete) => void
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* uni.chooseLocation函数参数定义
|
|
78
|
+
*/
|
|
79
|
+
export type ChooseLocationOptions = {
|
|
80
|
+
/**
|
|
81
|
+
* 指示位置的经度
|
|
82
|
+
* @uniPlatform {
|
|
83
|
+
* "app": {
|
|
84
|
+
* "android": {
|
|
85
|
+
* "osVer": "5.0",
|
|
86
|
+
* "uniVer": "√",
|
|
87
|
+
* "unixVer": "4.33"
|
|
88
|
+
* },
|
|
89
|
+
* "ios": {
|
|
90
|
+
* "osVer": "12.0",
|
|
91
|
+
* "uniVer": "√",
|
|
92
|
+
* "unixVer": "4.33"
|
|
93
|
+
* },
|
|
94
|
+
* "harmony": {
|
|
95
|
+
* "osVer": "3.0",
|
|
96
|
+
* "uniVer": "4.23",
|
|
97
|
+
* "unixVer": "x"
|
|
98
|
+
* }
|
|
99
|
+
* },
|
|
100
|
+
* "web": {
|
|
101
|
+
* "uniVer": "√",
|
|
102
|
+
* "unixVer": "4.0"
|
|
103
|
+
* }
|
|
104
|
+
* }
|
|
105
|
+
*/
|
|
106
|
+
latitude?: number | null,
|
|
107
|
+
/**
|
|
108
|
+
* 指示位置的纬度
|
|
109
|
+
* @uniPlatform {
|
|
110
|
+
* "app": {
|
|
111
|
+
* "android": {
|
|
112
|
+
* "osVer": "5.0",
|
|
113
|
+
* "uniVer": "√",
|
|
114
|
+
* "unixVer": "4.33"
|
|
115
|
+
* },
|
|
116
|
+
* "ios": {
|
|
117
|
+
* "osVer": "12.0",
|
|
118
|
+
* "uniVer": "√",
|
|
119
|
+
* "unixVer": "4.33"
|
|
120
|
+
* },
|
|
121
|
+
* "harmony": {
|
|
122
|
+
* "osVer": "3.0",
|
|
123
|
+
* "uniVer": "4.23",
|
|
124
|
+
* "unixVer": "x"
|
|
125
|
+
* }
|
|
126
|
+
* },
|
|
127
|
+
* "web": {
|
|
128
|
+
* "uniVer": "√",
|
|
129
|
+
* "unixVer": "4.0"
|
|
130
|
+
* }
|
|
131
|
+
* }
|
|
132
|
+
*/
|
|
133
|
+
longitude?: number | null,
|
|
134
|
+
/**
|
|
135
|
+
* 指示位置的名称
|
|
136
|
+
* @uniPlatform {
|
|
137
|
+
* "app": {
|
|
138
|
+
* "android": {
|
|
139
|
+
* "osVer": "5.0",
|
|
140
|
+
* "uniVer": "√",
|
|
141
|
+
* "unixVer": "4.33"
|
|
142
|
+
* },
|
|
143
|
+
* "ios": {
|
|
144
|
+
* "osVer": "12.0",
|
|
145
|
+
* "uniVer": "√",
|
|
146
|
+
* "unixVer": "4.33"
|
|
147
|
+
* },
|
|
148
|
+
* "harmony": {
|
|
149
|
+
* "osVer": "3.0",
|
|
150
|
+
* "uniVer": "4.23",
|
|
151
|
+
* "unixVer": "x"
|
|
152
|
+
* }
|
|
153
|
+
* },
|
|
154
|
+
* "web": {
|
|
155
|
+
* "uniVer": "√",
|
|
156
|
+
* "unixVer": "4.0"
|
|
157
|
+
* }
|
|
158
|
+
* }
|
|
159
|
+
*/
|
|
160
|
+
keyword?: string | null,
|
|
161
|
+
/**
|
|
162
|
+
* 用户自定义参数
|
|
163
|
+
* @uniPlatform {
|
|
164
|
+
* "app": {
|
|
165
|
+
* "android": {
|
|
166
|
+
* "osVer": "5.0",
|
|
167
|
+
* "uniVer": "√",
|
|
168
|
+
* "unixVer": "4.35"
|
|
169
|
+
* },
|
|
170
|
+
* "ios": {
|
|
171
|
+
* "osVer": "12.0",
|
|
172
|
+
* "uniVer": "√",
|
|
173
|
+
* "unixVer": "4.35"
|
|
174
|
+
* },
|
|
175
|
+
* "harmony": {
|
|
176
|
+
* "osVer": "3.0",
|
|
177
|
+
* "uniVer": "4.23",
|
|
178
|
+
* "unixVer": "x"
|
|
179
|
+
* }
|
|
180
|
+
* },
|
|
181
|
+
* "web": {
|
|
182
|
+
* "uniVer": "√",
|
|
183
|
+
* "unixVer": "4.35"
|
|
184
|
+
* }
|
|
185
|
+
* }
|
|
186
|
+
*/
|
|
187
|
+
payload?: UTSJSONObject | null,
|
|
188
|
+
/**
|
|
189
|
+
* 接口调用成功的回调函数
|
|
190
|
+
* @uniPlatform {
|
|
191
|
+
* "app": {
|
|
192
|
+
* "android": {
|
|
193
|
+
* "osVer": "5.0",
|
|
194
|
+
* "uniVer": "√",
|
|
195
|
+
* "unixVer": "4.33"
|
|
196
|
+
* },
|
|
197
|
+
* "ios": {
|
|
198
|
+
* "osVer": "12.0",
|
|
199
|
+
* "uniVer": "√",
|
|
200
|
+
* "unixVer": "4.33"
|
|
201
|
+
* },
|
|
202
|
+
* "harmony": {
|
|
203
|
+
* "osVer": "3.0",
|
|
204
|
+
* "uniVer": "4.23",
|
|
205
|
+
* "unixVer": "x"
|
|
206
|
+
* }
|
|
207
|
+
* },
|
|
208
|
+
* "web": {
|
|
209
|
+
* "uniVer": "√",
|
|
210
|
+
* "unixVer": "4.0"
|
|
211
|
+
* }
|
|
212
|
+
* }
|
|
213
|
+
*/
|
|
214
|
+
success?: ChooseLocationSuccessCallback | null,
|
|
215
|
+
/**
|
|
216
|
+
* 接口调用失败的回调函数
|
|
217
|
+
* @uniPlatform {
|
|
218
|
+
* "app": {
|
|
219
|
+
* "android": {
|
|
220
|
+
* "osVer": "5.0",
|
|
221
|
+
* "uniVer": "√",
|
|
222
|
+
* "unixVer": "4.33"
|
|
223
|
+
* },
|
|
224
|
+
* "ios": {
|
|
225
|
+
* "osVer": "12.0",
|
|
226
|
+
* "uniVer": "√",
|
|
227
|
+
* "unixVer": "4.33"
|
|
228
|
+
* },
|
|
229
|
+
* "harmony": {
|
|
230
|
+
* "osVer": "3.0",
|
|
231
|
+
* "uniVer": "4.23",
|
|
232
|
+
* "unixVer": "x"
|
|
233
|
+
* }
|
|
234
|
+
* },
|
|
235
|
+
* "web": {
|
|
236
|
+
* "uniVer": "√",
|
|
237
|
+
* "unixVer": "4.0"
|
|
238
|
+
* }
|
|
239
|
+
* }
|
|
240
|
+
*/
|
|
241
|
+
fail?: ChooseLocationFailCallback | null,
|
|
242
|
+
/**
|
|
243
|
+
* 接口调用结束的回调函数(调用成功、失败都会执行)
|
|
244
|
+
* @uniPlatform {
|
|
245
|
+
* "app": {
|
|
246
|
+
* "android": {
|
|
247
|
+
* "osVer": "5.0",
|
|
248
|
+
* "uniVer": "√",
|
|
249
|
+
* "unixVer": "4.33"
|
|
250
|
+
* },
|
|
251
|
+
* "ios": {
|
|
252
|
+
* "osVer": "12.0",
|
|
253
|
+
* "uniVer": "√",
|
|
254
|
+
* "unixVer": "4.33"
|
|
255
|
+
* },
|
|
256
|
+
* "harmony": {
|
|
257
|
+
* "osVer": "3.0",
|
|
258
|
+
* "uniVer": "4.23",
|
|
259
|
+
* "unixVer": "x"
|
|
260
|
+
* }
|
|
261
|
+
* },
|
|
262
|
+
* "web": {
|
|
263
|
+
* "uniVer": "√",
|
|
264
|
+
* "unixVer": "4.0"
|
|
265
|
+
* }
|
|
266
|
+
* }
|
|
267
|
+
*/
|
|
268
|
+
complete?: ChooseLocationCompleteCallback | null
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* 打开地图选择位置
|
|
273
|
+
*
|
|
274
|
+
* @param {ChooseLocationOptions} options
|
|
275
|
+
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/prompt.html#chooselocation
|
|
276
|
+
* @uniPlatform {
|
|
277
|
+
* "app": {
|
|
278
|
+
* "android": {
|
|
279
|
+
* "osVer": "5.0",
|
|
280
|
+
* "uniVer": "√",
|
|
281
|
+
* "unixVer": "4.33"
|
|
282
|
+
* },
|
|
283
|
+
* "ios": {
|
|
284
|
+
* "osVer": "12.0",
|
|
285
|
+
* "uniVer": "√",
|
|
286
|
+
* "unixVer": "4.33"
|
|
287
|
+
* },
|
|
288
|
+
* "harmony": {
|
|
289
|
+
* "osVer": "3.0",
|
|
290
|
+
* "uniVer": "4.23",
|
|
291
|
+
* "unixVer": "x"
|
|
292
|
+
* }
|
|
293
|
+
* },
|
|
294
|
+
* "web": {
|
|
295
|
+
* "uniVer": "√",
|
|
296
|
+
* "unixVer": "4.0"
|
|
297
|
+
* }
|
|
298
|
+
* }
|
|
299
|
+
*/
|
|
300
|
+
export type ChooseLocation = (options: ChooseLocationOptions) => void;
|
|
301
|
+
|
|
302
|
+
export interface Uni {
|
|
303
|
+
/**
|
|
304
|
+
* @description 打开地图选择位置
|
|
305
|
+
* @example
|
|
306
|
+
* ```typescript
|
|
307
|
+
uni.chooseLocation({
|
|
308
|
+
success: (res) => {
|
|
309
|
+
console.log('res: ', res)
|
|
310
|
+
},
|
|
311
|
+
fail: (err) => {
|
|
312
|
+
console.log('err: ', err)
|
|
313
|
+
},
|
|
314
|
+
complete: (res) => {
|
|
315
|
+
console.log('complete: ', res)
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
* ```
|
|
319
|
+
* @tutorial https://doc.dcloud.net.cn/uni-app-x/api/choose-location.html
|
|
320
|
+
* @uniPlatform {
|
|
321
|
+
* "app": {
|
|
322
|
+
* "android": {
|
|
323
|
+
* "osVer": "5.0",
|
|
324
|
+
* "uniVer": "√",
|
|
325
|
+
* "unixVer": "4.33"
|
|
326
|
+
* },
|
|
327
|
+
* "ios": {
|
|
328
|
+
* "osVer": "12.0",
|
|
329
|
+
* "uniVer": "√",
|
|
330
|
+
* "unixVer": "4.33"
|
|
331
|
+
* },
|
|
332
|
+
* "harmony": {
|
|
333
|
+
* "osVer": "3.0",
|
|
334
|
+
* "uniVer": "4.23",
|
|
335
|
+
* "unixVer": "x"
|
|
336
|
+
* }
|
|
337
|
+
* },
|
|
338
|
+
* "mp": {
|
|
339
|
+
* "weixin": {
|
|
340
|
+
* "hostVer": "√",
|
|
341
|
+
* "uniVer": "√",
|
|
342
|
+
* "unixVer": "4.41"
|
|
343
|
+
* },
|
|
344
|
+
* "alipay": {
|
|
345
|
+
* "hostVer": "√",
|
|
346
|
+
* "uniVer": "√",
|
|
347
|
+
* "unixVer": "x"
|
|
348
|
+
* },
|
|
349
|
+
* "baidu": {
|
|
350
|
+
* "hostVer": "√",
|
|
351
|
+
* "uniVer": "√",
|
|
352
|
+
* "unixVer": "x"
|
|
353
|
+
* },
|
|
354
|
+
* "toutiao": {
|
|
355
|
+
* "hostVer": "√",
|
|
356
|
+
* "uniVer": "√",
|
|
357
|
+
* "unixVer": "x"
|
|
358
|
+
* },
|
|
359
|
+
* "lark": {
|
|
360
|
+
* "hostVer": "√",
|
|
361
|
+
* "uniVer": "√",
|
|
362
|
+
* "unixVer": "x"
|
|
363
|
+
* },
|
|
364
|
+
* "qq": {
|
|
365
|
+
* "hostVer": "√",
|
|
366
|
+
* "uniVer": "√",
|
|
367
|
+
* "unixVer": "x"
|
|
368
|
+
* },
|
|
369
|
+
* "kuaishou": {
|
|
370
|
+
* "hostVer": "√",
|
|
371
|
+
* "uniVer": "√",
|
|
372
|
+
* "unixVer": "x"
|
|
373
|
+
* },
|
|
374
|
+
* "jd": {
|
|
375
|
+
* "hostVer": "√",
|
|
376
|
+
* "uniVer": "√",
|
|
377
|
+
* "unixVer": "x"
|
|
378
|
+
* }
|
|
379
|
+
* },
|
|
380
|
+
* "web": {
|
|
381
|
+
* "uniVer": "√",
|
|
382
|
+
* "unixVer": "4.0"
|
|
383
|
+
* }
|
|
384
|
+
* }
|
|
385
|
+
*/
|
|
386
|
+
chooseLocation(options: ChooseLocationOptions): void;
|
|
387
|
+
}
|
|
388
|
+
// #ifdef APP-ANDROID
|
|
389
|
+
// @ts-expect-error
|
|
390
|
+
export class ChooseLocationSuccessImpl extends AsyncApiSuccessResult implements ChooseLocationSuccess {
|
|
391
|
+
name: string
|
|
392
|
+
address: string
|
|
393
|
+
latitude: number
|
|
394
|
+
longitude: number
|
|
395
|
+
// @ts-expect-error
|
|
396
|
+
override errMsg: string
|
|
397
|
+
constructor(name: string, address: string, latitude: number, longitude: number, errMsg: string = 'chooseLocation:ok') {
|
|
398
|
+
super()
|
|
399
|
+
this.errMsg = errMsg
|
|
400
|
+
this.name = name
|
|
401
|
+
this.address = address
|
|
402
|
+
this.latitude = latitude
|
|
403
|
+
this.longitude = longitude
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
export class ChooseLocationFailImpl extends UniError implements ChooseLocationFail {
|
|
407
|
+
override errCode: ChooseLocationErrorCode
|
|
408
|
+
constructor(errMsg: string = 'chooseLocation:fail cancel', errCode: ChooseLocationErrorCode = 1) {
|
|
409
|
+
super()
|
|
410
|
+
this.errCode = errCode
|
|
411
|
+
this.errMsg = errMsg
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
// #endif
|
|
@@ -26,7 +26,7 @@ export interface Uni {
|
|
|
26
26
|
* "weixin": {
|
|
27
27
|
* "hostVer": "√",
|
|
28
28
|
* "uniVer": "√",
|
|
29
|
-
* "unixVer": "4.
|
|
29
|
+
* "unixVer": "4.41"
|
|
30
30
|
* },
|
|
31
31
|
* "alipay": {
|
|
32
32
|
* "hostVer": "√",
|
|
@@ -98,7 +98,7 @@ export interface Uni {
|
|
|
98
98
|
* "weixin": {
|
|
99
99
|
* "hostVer": "√",
|
|
100
100
|
* "uniVer": "√",
|
|
101
|
-
* "unixVer": "4.
|
|
101
|
+
* "unixVer": "4.41"
|
|
102
102
|
* },
|
|
103
103
|
* "alipay": {
|
|
104
104
|
* "hostVer": "√",
|