@dcloudio/uni-app-x 0.7.38 → 0.7.40

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