@tarojs/components 3.5.5 → 3.5.6-alpha.1

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 (73) hide show
  1. package/dist/cjs/taro-input-core.cjs.entry.js +24 -3
  2. package/dist/cjs/taro-video-control_3.cjs.entry.js +21 -3
  3. package/dist/collection/components/input/input.js +24 -3
  4. package/dist/collection/components/video/video.js +23 -3
  5. package/dist/collection/utils/json-schema-to-types.js +224 -0
  6. package/dist/esm/taro-input-core.entry.js +24 -3
  7. package/dist/esm/taro-video-control_3.entry.js +21 -3
  8. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  9. package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
  10. package/dist/taro-components/p-0380841f.system.js +1 -1
  11. package/dist/taro-components/p-232ebfae.system.entry.js +1 -0
  12. package/dist/taro-components/{p-7e8943d8.entry.js → p-3744e978.entry.js} +1 -1
  13. package/dist/taro-components/p-56c86512.entry.js +1 -0
  14. package/dist/taro-components/{p-ed8c1bb8.system.entry.js → p-f81a74bb.system.entry.js} +1 -1
  15. package/dist/taro-components/taro-components.esm.js +1 -1
  16. package/dist/types/components/input/input.d.ts +1 -0
  17. package/dist/types/utils/json-schema-to-types.d.ts +25 -0
  18. package/dist-h5/react/components/index.js +5 -5
  19. package/package.json +9 -5
  20. package/types/Ad.d.ts +99 -9
  21. package/types/AdCustom.d.ts +1 -3
  22. package/types/Audio.d.ts +16 -16
  23. package/types/Block.d.ts +0 -2
  24. package/types/Button.d.ts +187 -47
  25. package/types/Camera.d.ts +20 -18
  26. package/types/Canvas.d.ts +52 -13
  27. package/types/Checkbox.d.ts +13 -10
  28. package/types/CheckboxGroup.d.ts +5 -7
  29. package/types/CoverImage.d.ts +44 -5
  30. package/types/CoverView.d.ts +34 -10
  31. package/types/Editor.d.ts +4 -6
  32. package/types/Form.d.ts +23 -7
  33. package/types/FunctionalPageNavigator.d.ts +5 -3
  34. package/types/Icon.d.ts +19 -7
  35. package/types/Image.d.ts +71 -14
  36. package/types/Input.d.ts +44 -33
  37. package/types/Label.d.ts +0 -3
  38. package/types/LivePlayer.d.ts +80 -24
  39. package/types/LivePusher.d.ts +78 -37
  40. package/types/Map.d.ts +208 -66
  41. package/types/MatchMedia.d.ts +8 -10
  42. package/types/MovableArea.d.ts +1 -3
  43. package/types/MovableView.d.ts +88 -30
  44. package/types/NavigationBar.d.ts +0 -2
  45. package/types/Navigator.d.ts +35 -18
  46. package/types/OfficialAccount.d.ts +10 -3
  47. package/types/OpenData.d.ts +35 -6
  48. package/types/PageContainer.d.ts +13 -10
  49. package/types/PageMeta.d.ts +27 -13
  50. package/types/Picker.d.ts +50 -14
  51. package/types/PickerView.d.ts +31 -13
  52. package/types/PickerViewColumn.d.ts +0 -2
  53. package/types/Progress.d.ts +17 -14
  54. package/types/Radio.d.ts +16 -6
  55. package/types/RadioGroup.d.ts +6 -4
  56. package/types/RichText.d.ts +53 -5
  57. package/types/RootPortal.d.ts +2 -1
  58. package/types/ScrollView.d.ts +82 -19
  59. package/types/ShareElement.d.ts +5 -7
  60. package/types/Slider.d.ts +41 -17
  61. package/types/Swiper.d.ts +100 -22
  62. package/types/SwiperItem.d.ts +6 -3
  63. package/types/Switch.d.ts +22 -8
  64. package/types/Text.d.ts +10 -6
  65. package/types/Textarea.d.ts +61 -28
  66. package/types/Video.d.ts +331 -50
  67. package/types/View.d.ts +122 -9
  68. package/types/VoipRoom.d.ts +6 -9
  69. package/types/WebView.d.ts +9 -7
  70. package/types/common.d.ts +1 -1
  71. package/types/index.vue3.d.ts +261 -138
  72. package/dist/taro-components/p-1b356f4d.entry.js +0 -1
  73. package/dist/taro-components/p-a39276ff.system.entry.js +0 -1
package/types/Map.d.ts CHANGED
@@ -1,170 +1,167 @@
1
1
  import { ComponentType } from 'react'
2
2
  import { StandardProps, CommonEventFunction } from './common'
3
-
4
3
  interface MapProps extends StandardProps {
5
4
  /** 中心经度
6
- * @supported weapp, swan, alipay, tt
5
+ * @supported weapp, alipay, swan, tt, qq, jd
7
6
  */
8
7
  longitude: number
9
8
 
10
9
  /** 中心纬度
11
- * @supported weapp, swan, alipay, tt
10
+ * @supported weapp, alipay, swan, tt, qq, jd
12
11
  */
13
12
  latitude: number
14
13
 
15
- /** 缩放级别,取值范围为3-20
14
+ /** 缩放级别,取值范围为 3-20
16
15
  * @default 16
17
- * @supported weapp, swan, alipay, tt
16
+ * @supported weapp, alipay, swan, tt, qq, jd
18
17
  * @swan 取值范围为4-21
19
18
  * @alipay 取值范围为5-18
20
19
  */
21
20
  scale?: number
22
- /** 最小缩放级别3-20
21
+
22
+ /** 最小缩放级别 3-20
23
23
  * @default 3
24
24
  * @supported weapp, tt
25
25
  */
26
26
  minScale?: number
27
- /** 最大缩放级别3-20
28
- * (备注: 字节小程序最大缩放级别 3-19)
29
- * @default 20 (字节小程序默认为19)
27
+
28
+ /** 最大缩放级别 3-20
29
+ * @default 20
30
30
  * @supported weapp, tt
31
31
  */
32
32
  maxScale?: number
33
33
 
34
34
  /** 标记点
35
- * @supported weapp, swan, alipay, tt
35
+ * @supported weapp, alipay, swan, tt, qq, jd
36
36
  */
37
37
  markers?: MapProps.marker[]
38
38
 
39
39
  /** 标记点
40
- * @deprecated 即将移除,请使用 markers
41
40
  * @supported weapp
42
41
  */
43
42
  covers?: any[]
44
43
 
45
44
  /** 路线
46
- * @supported weapp, swan, alipay, tt
45
+ * @supported weapp, alipay, swan, tt, qq, jd
47
46
  */
48
47
  polyline?: MapProps.polyline[]
49
48
 
50
49
  /** 圆
51
- * @supported weapp, swan, alipay, tt
50
+ * @supported weapp, alipay, swan, tt, qq, jd
52
51
  */
53
52
  circles?: MapProps.circle[]
54
53
 
55
54
  /** 控件(即将废弃,建议使用 cover-view 代替)
56
55
  * @deprecated
57
- * @supported weapp, swan, alipay
56
+ * @supported weapp, alipay, swan, jd
58
57
  */
59
58
  controls?: MapProps.control[]
60
59
 
61
60
  /** 缩放视野以包含所有给定的坐标点
62
- * @supported weapp, swan, alipay, tt
61
+ * @supported weapp, alipay, swan, tt, qq, jd
63
62
  */
64
63
  includePoints?: MapProps.point[]
65
64
 
66
65
  /** 显示带有方向的当前定位点
67
66
  * @default false
68
- * @supported weapp, swan, alipay, tt
67
+ * @supported weapp, alipay, swan, tt, qq, jd
69
68
  */
70
69
  showLocation?: boolean
71
70
 
72
71
  /** 多边形
73
- * @supported weapp, swan, alipay, tt
72
+ * @supported weapp, swan, tt, qq
74
73
  */
75
74
  polygons?: MapProps.polygon[]
76
75
 
77
76
  /** 个性化地图使用的 key
78
- * @supported weapp
77
+ * @supported weapp, qq
79
78
  */
80
79
  subkey?: string
81
80
 
82
81
  /** 个性化地图配置的 style,不支持动态修改
83
82
  * @default 1
84
- * @supported weapp
83
+ * @supported weapp, qq
85
84
  */
86
85
  layerStyle?: number
87
86
 
88
87
  /** 旋转角度,范围 0 ~ 360, 地图正北和设备 y 轴角度的夹角
89
88
  * @default 0
90
- * @supported weapp, tt
89
+ * @supported weapp, alipay, tt, qq
91
90
  */
92
91
  rotate?: number
93
92
 
94
93
  /** 倾斜角度,范围 0 ~ 40 , 关于 z 轴的倾角
95
94
  * @default 0
96
- * @supported weapp, tt
95
+ * @supported weapp, alipay, tt, qq
97
96
  */
98
97
  skew?: number
99
98
 
100
- /** 展示 3D 楼块
101
- * @default false
102
- * @supported weapp, swan, tt
103
- */
104
- enable3D?: boolean
105
-
106
99
  /** 显示指南针
107
100
  * @default false
108
- * @supported weapp, swan, tt
101
+ * @supported weapp, alipay, swan, tt, qq
109
102
  */
110
103
  showCompass?: boolean
111
104
 
112
105
  /** 显示比例尺
113
106
  * @default false
114
- * @supported weapp, tt
107
+ * @supported weapp, alipay, tt, qq
115
108
  */
116
109
  showScale?: boolean
117
110
 
118
111
  /** 开启俯视
119
112
  * @default false
120
- * @supported weapp, swan, tt
113
+ * @supported weapp, alipay, swan, tt, qq
121
114
  */
122
115
  enableOverlooking?: boolean
123
116
 
124
117
  /** 是否支持缩放
125
118
  * @default true
126
- * @supported weapp, swan, tt
119
+ * @supported weapp, alipay, swan, tt, qq
127
120
  */
128
121
  enableZoom?: boolean
129
122
 
130
123
  /** 是否支持拖动
131
124
  * @default true
132
- * @supported weapp, swan, tt
125
+ * @supported weapp, alipay, swan, tt, qq
133
126
  */
134
127
  enableScroll?: boolean
135
128
 
136
129
  /** 是否支持旋转
137
130
  * @default false
138
- * @supported weapp, swan, tt
131
+ * @supported weapp, alipay, swan, tt, qq
139
132
  */
140
133
  enableRotate?: boolean
141
134
 
142
135
  /** 是否开启卫星图
143
136
  * @default false
144
- * @supported weapp, tt
137
+ * @supported weapp, alipay, tt, qq
145
138
  */
146
139
  enableSatellite?: boolean
147
140
 
148
141
  /** 是否开启实时路况
149
142
  * @default false
150
- * @supported weapp, tt
143
+ * @supported weapp, alipay, tt, qq
151
144
  */
152
145
  enableTraffic?: boolean
153
146
 
154
147
  /** 配置项
155
148
  *
156
149
  * 提供 setting 对象统一设置地图配置。同时对于一些动画属性如 rotate 和 skew,通过 setData 分开设置时无法同时生效,需通过 settting 统一修改。
157
- * @supported weapp, alipay
150
+ * @supported weapp, alipay, qq
158
151
  */
159
- setting?: MapProps | { [key: string]: number | string | any }
152
+ setting?:
153
+ | MapProps
154
+ | {
155
+ [key: string]: number | string | any
156
+ }
160
157
 
161
158
  /** 点击地图时触发
162
- * @supported weapp, swan, alipay, tt
159
+ * @supported weapp, alipay, swan, tt, qq, jd
163
160
  */
164
161
  onTap?: CommonEventFunction
165
162
 
166
163
  /** 点击标记点时触发,e.detail = {markerId}
167
- * @supported weapp, swan, alipay, tt
164
+ * @supported weapp, alipay, swan, tt, qq, jd
168
165
  */
169
166
  onMarkerTap?: CommonEventFunction<MapProps.onMarkerTapEventDetail>
170
167
 
@@ -174,34 +171,38 @@ interface MapProps extends StandardProps {
174
171
  onLabelTap?: CommonEventFunction<MapProps.onLabelTapEventDetail>
175
172
 
176
173
  /** 点击控件时触发,e.detail = {controlId}
177
- * @supported weapp, swan, alipay
174
+ * @supported weapp, alipay, swan, jd
178
175
  */
179
176
  onControlTap?: CommonEventFunction<MapProps.onControlTapEventDetail>
180
177
 
181
178
  /** 点击标记点对应的气泡时触发,e.detail = {markerId}
182
- * @supported weapp, swan, alipay, tt
179
+ * @supported alipay
183
180
  */
184
181
  onCalloutTap?: CommonEventFunction<MapProps.onCalloutTapEventDetail>
185
182
 
186
183
  /** 在地图渲染更新完成时触发
187
- * @supported weapp, swan, tt
184
+ * @supported weapp, swan, tt, qq
188
185
  */
189
186
  onUpdated?: CommonEventFunction
190
187
 
191
188
  /** 视野发生变化时触发
192
- * @supported weapp, swan, alipay, tt
189
+ * @supported weapp, alipay, swan, tt, qq, jd
193
190
  */
194
- onRegionChange?: CommonEventFunction<MapProps.onRegionEventDetail<'begin'> | MapProps.onRegionEventDetail<'end'>>
191
+ onRegionChange?: CommonEventFunction<
192
+ MapProps.onRegionEventDetail<'begin'> | MapProps.onRegionEventDetail<'end'>
193
+ >
195
194
 
196
195
  /** 点击地图poi点时触发,e.detail = {name, longitude, latitude}
197
- * @supported weapp, swan
196
+ * @supported weapp, swan, qq
198
197
  */
199
198
  onPoiTap?: CommonEventFunction<MapProps.onPoiTapEventDetail>
200
199
 
201
200
  /** 视野在地图 padding 范围内展示
202
201
  * @supported alipay
203
202
  */
204
- includePadding?: { [key in ('left' | 'right' | 'top' | 'bottom')]: number | string }
203
+ includePadding?: {
204
+ [key in 'left' | 'right' | 'top' | 'bottom']: number | string
205
+ }
205
206
 
206
207
  /** 覆盖物,自定义贴图
207
208
  * @supported alipay
@@ -213,12 +214,98 @@ interface MapProps extends StandardProps {
213
214
  */
214
215
  tileOverlay?: any[]
215
216
 
216
- /** 开启 optimize 模式后,无需再监听 onRegionChange 来获取并设置新的 scale 值以保证地图不会再回到原来的缩放比例。
217
+ /** 是否展示 POI
218
+ * @supported weapp, alipay, tt
219
+ */
220
+ enablePoi?: string
221
+
222
+ /** 是否展示建筑物
223
+ * @supported weapp, alipay, tt
224
+ */
225
+ enableBuilding?: string
226
+
227
+ /** 点击标记点对应的气泡时触发e.detail = {markerId}
228
+ * @supported weapp, swan, tt, jd
229
+ */
230
+ onCallOutTap?: CommonEventFunction
231
+
232
+ /** 点击定位标时触发,e.detail = {longitude, latitude}
233
+ * @supported weapp, tt
234
+ */
235
+ onAnchorPointTap?: CommonEventFunction
236
+
237
+ /** 内联样式。
217
238
  * @supported alipay
218
239
  */
219
- optimize?: boolean
220
- }
240
+ style?: string
241
+
242
+ /** 样式名。
243
+ * @supported alipay
244
+ */
245
+ class?: string
246
+
247
+ /** 覆盖物,多边形。
248
+ *
249
+ * 版本要求:基础库 1.10.0 及以上
250
+ * @supported alipay
251
+ */
252
+ polygon?: string
253
+
254
+ /** 设置地图样式。
255
+ *
256
+ * default:默认样式
257
+ * light:精简样式
258
+ *
259
+ * 版本要求:基础库 1.20.0 及以上
260
+ * @supported alipay
261
+ */
262
+ customMapStyle?: string
263
+
264
+ /** 基于 map 高级定制渲染,设置覆盖在地图上的 view。
265
+ *
266
+ * 版本要求:基础库 1.23.0 及以上
267
+ * @supported alipay
268
+ */
269
+ panels?: string
270
+
271
+ /** 点击 panel 时触发。
272
+ *
273
+ * {
274
+ *
275
+ *    panelId,
276
+ *
277
+ *    layoutId,
278
+ *
279
+ * }
280
+ *
281
+ * 版本要求:基础库 1.23.0 及以上
282
+ * @supported alipay
283
+ */
284
+ onPanelTap?: CommonEventFunction
285
+
286
+ /** 地图初始化完成即将开始渲染第一帧时触发。
287
+ *
288
+ * 版本要求:基础库 2.7.2 及以上
289
+ * @supported alipay
290
+ */
291
+ onInitComplete?: CommonEventFunction
221
292
 
293
+ /** 否
294
+ * @supported jd
295
+ */
296
+ theme?: string
297
+
298
+ /** 内联样式。
299
+ * @supported alipay
300
+ */
301
+ optimize?: string
302
+
303
+ /** 展示3D楼块
304
+ * @supported weapp, swan, tt, qq
305
+ * @default false
306
+ */
307
+ enable3D?: string
308
+ }
222
309
  declare namespace MapProps {
223
310
  /** 标记点用于在地图上显示标记的位置 */
224
311
  interface marker {
@@ -226,53 +313,66 @@ declare namespace MapProps {
226
313
  * @remarks marker 点击事件回调会返回此id。建议为每个 marker 设置上 Number 类型 id,保证更新 marker 时有更好的性能。
227
314
  */
228
315
  id?: number
316
+
229
317
  /** 纬度
230
318
  * @remarks 浮点数,范围 -90 ~ 90
231
319
  */
232
320
  latitude: number
321
+
233
322
  /** 经度
234
323
  * @remarks 浮点数,范围 -180 ~ 180
235
324
  */
236
325
  longitude: number
326
+
237
327
  /** 标注点名
238
328
  * @remarks 点击时显示,callout 存在时将被忽略
239
329
  */
240
330
  title?: string
331
+
241
332
  /** 显示层级
242
333
  */
243
334
  zIndex?: number
335
+
244
336
  /** 显示的图标
245
337
  * @remarks 项目目录下的图片路径,支持相对路径写法,以'/'开头则表示相对小程序根目录;也支持临时路径和网络图片
246
338
  */
247
339
  iconPath: string
340
+
248
341
  /** 旋转角度
249
342
  * @remarks 顺时针旋转的角度,范围 0 ~ 360,默认为 0
250
343
  */
251
344
  rotate?: number
345
+
252
346
  /** 标注的透明度
253
347
  * @remarks 默认1,无透明,范围 0 ~ 1
254
348
  */
255
349
  alpha?: number
350
+
256
351
  /** 标注图标宽度
257
352
  * @remarks 默认为图片实际宽度
258
353
  */
259
354
  width?: number | string
355
+
260
356
  /** 标注图标高度
261
357
  * @remarks 默认为图片实际高度
262
358
  */
263
359
  height?: number | string
360
+
264
361
  /** 标记点上方的气泡窗口
265
362
  * @remarks 支持的属性见下表,可识别换行符。
266
363
  */
267
364
  callout?: callout
365
+
268
366
  /** 自定义气泡窗口
269
367
  * @remarks 支持的属性见下表,可识别换行符。
270
368
  */
271
369
  customCallout?: customCallout
370
+
272
371
  /** 为标记点旁边增加标签
273
372
  * @remarks 支持的属性见下表
274
373
  */
275
374
  label?: label
375
+
276
376
  /** 经纬度在标注图标的锚点,默认底边中点
277
377
  * @remarks {x, y},x表示横向(0-1),y表示竖向(0-1)。{x: .5, y: 1} 表示底边中点
278
378
  */
@@ -280,6 +380,7 @@ declare namespace MapProps {
280
380
  x: number
281
381
  y: number
282
382
  }
383
+
283
384
  /** 无障碍访问,(属性)元素的额外描述 */
284
385
  ariaLabel?: string
285
386
  }
@@ -288,26 +389,37 @@ declare namespace MapProps {
288
389
  interface callout {
289
390
  /** 文本 */
290
391
  content: string
392
+
291
393
  /** 文本颜色 */
292
394
  color: string
395
+
293
396
  /** 文字大小 */
294
397
  fontSize: number
398
+
295
399
  /** 横向偏移量,向右为正数 */
296
400
  anchorX: number
401
+
297
402
  /** 纵向偏移量,向下为正数 */
298
403
  anchorY: number
404
+
299
405
  /** 边框圆角 */
300
406
  borderRadius: number
407
+
301
408
  /** 边框宽度 */
302
409
  borderWidth: number
410
+
303
411
  /** 边框颜色 */
304
412
  borderColor: string
413
+
305
414
  /** 背景色 */
306
415
  bgColor: string
416
+
307
417
  /** 文本边缘留白 */
308
418
  padding: number
419
+
309
420
  /** 'BYCLICK':点击显示; 'ALWAYS':常显 */
310
421
  display: 'BYCLICK' | 'ALWAYS'
422
+
311
423
  /** 文本对齐方式。有效值: left, right, center */
312
424
  textAlign: 'left' | 'right' | 'center'
313
425
  }
@@ -319,8 +431,10 @@ declare namespace MapProps {
319
431
  interface customCallout {
320
432
  /** 'BYCLICK':点击显示; 'ALWAYS':常显 */
321
433
  display: 'BYCLICK' | 'ALWAYS' | string
434
+
322
435
  /** 横向偏移量,向右为正数 */
323
436
  anchorX: number
437
+
324
438
  /** 纵向偏移量,向下为正数 */
325
439
  anchorY: number
326
440
  }
@@ -329,32 +443,34 @@ declare namespace MapProps {
329
443
  interface label {
330
444
  /** 文本 */
331
445
  content: string
446
+
332
447
  /** 文本颜色 */
333
448
  color: string
449
+
334
450
  /** 文字大小 */
335
451
  fontSize: number
336
- /** label的坐标(废弃)
337
- * @deprecated
338
- */
339
- x: number
340
- /** label的坐标(废弃)
341
- * @deprecated
342
- */
343
- y: number
452
+
344
453
  /** label的坐标,原点是 marker 对应的经纬度 */
345
454
  anchorX: number
455
+
346
456
  /** label的坐标,原点是 marker 对应的经纬度 */
347
457
  anchorY: number
458
+
348
459
  /** 边框宽度 */
349
460
  borderWidth: number
461
+
350
462
  /** 边框颜色 */
351
463
  borderColor: string
464
+
352
465
  /** 边框圆角 */
353
466
  borderRadius: number
467
+
354
468
  /** 背景色 */
355
469
  bgColor: string
470
+
356
471
  /** 文本边缘留白 */
357
472
  padding: number
473
+
358
474
  /** 文本对齐方式。有效值: left, right, center */
359
475
  textAlign: 'left' | 'right' | 'center'
360
476
  }
@@ -365,26 +481,33 @@ declare namespace MapProps {
365
481
  * @remarks [{latitude: 0, longitude: 0}]
366
482
  */
367
483
  points: point[]
484
+
368
485
  /** 线的颜色
369
486
  * @remarks 十六进制
370
487
  */
371
488
  color?: string
489
+
372
490
  /** 线的宽度 */
373
491
  width?: number
492
+
374
493
  /** 是否虚线
375
494
  * @remarks 默认 false
376
495
  */
377
496
  dottedLine?: boolean
497
+
378
498
  /** 带箭头的线
379
499
  * @remarks 默认 false,开发者工具暂不支持该属性
380
500
  */
381
501
  arrowLine?: boolean
502
+
382
503
  /** 更换箭头图标
383
504
  * @remarks 在 arrowLine 为 true 时生效
384
505
  */
385
506
  arrowIconPath?: string
507
+
386
508
  /** 线的边框颜色 */
387
509
  borderColor?: string
510
+
388
511
  /** 线的厚度 */
389
512
  borderWidth?: number
390
513
  }
@@ -395,16 +518,20 @@ declare namespace MapProps {
395
518
  * @remarks [{latitude: 0, longitude: 0}]
396
519
  */
397
520
  points: point[]
521
+
398
522
  /** 描边的宽度 */
399
523
  strokeWidth?: number
524
+
400
525
  /** 描边的颜色
401
526
  * @remarks 十六进制
402
527
  */
403
528
  strokeColor?: string
529
+
404
530
  /** 填充颜色
405
531
  * @remarks 十六进制
406
532
  */
407
533
  fillColor?: string
534
+
408
535
  /** 设置多边形Z轴数值 */
409
536
  zIndex?: number
410
537
  }
@@ -415,20 +542,25 @@ declare namespace MapProps {
415
542
  * @remarks 浮点数,范围 -90 ~ 90
416
543
  */
417
544
  latitude: number
545
+
418
546
  /** 经度
419
547
  * @remarks 浮点数,范围 -180 ~ 180
420
548
  */
421
549
  longitude?: number
550
+
422
551
  /** 描边的颜色
423
552
  * @remarks 十六进制
424
553
  */
425
554
  color?: string
555
+
426
556
  /** 填充颜色
427
557
  * @remarks 十六进制
428
558
  */
429
559
  fillColor?: string
560
+
430
561
  /** 半径 */
431
562
  radius: number
563
+
432
564
  /** 描边的宽度 */
433
565
  strokeWidth?: number
434
566
  }
@@ -441,46 +573,50 @@ declare namespace MapProps {
441
573
  * @remarks 在控件点击事件回调会返回此id
442
574
  */
443
575
  id?: number
576
+
444
577
  /** 控件在地图的位置
445
578
  * @remarks 控件相对地图位置
446
579
  */
447
580
  position: position
581
+
448
582
  /** 显示的图标
449
583
  * @remarks 项目目录下的图片路径,支持本地路径、代码包路径
450
584
  */
451
585
  iconPath: string
586
+
452
587
  /** 是否可点击
453
588
  * @remarks 默认不可点击
454
589
  */
455
590
  clickable?: boolean
456
591
  }
457
-
458
592
  interface point {
459
593
  /** 经度 */
460
594
  longitude: number
595
+
461
596
  /** 纬度 */
462
597
  latitude: number
463
598
  }
464
-
465
599
  interface position {
466
600
  /** 距离地图的左边界多远
467
601
  * @default 0
468
602
  */
469
603
  left: number
604
+
470
605
  /** 距离地图的上边界多远
471
606
  * @default 0
472
607
  */
473
608
  top: number
609
+
474
610
  /** 控件宽度
475
611
  * @default 图片宽度
476
612
  */
477
613
  width: number
614
+
478
615
  /** 控件高度
479
616
  * @default 图片宽度
480
617
  */
481
618
  height: number
482
619
  }
483
-
484
620
  interface onMarkerTapEventDetail {
485
621
  markerId: number | string
486
622
  }
@@ -493,25 +629,25 @@ declare namespace MapProps {
493
629
  interface onCalloutTapEventDetail {
494
630
  markerId: number | string
495
631
  }
496
-
497
632
  namespace RegionChangeDetail {
498
633
  interface type {
499
634
  begin
500
635
  end
501
636
  }
502
-
503
637
  interface CausedByBegin {
504
638
  /** 手势触发 */
505
639
  gesture
640
+
506
641
  /** 接口触发 */
507
642
  update
508
643
  }
509
-
510
644
  interface CausedByEnd {
511
645
  /** 拖动导致 */
512
646
  drag
647
+
513
648
  /** 缩放导致 */
514
649
  scale
650
+
515
651
  /** 调用更新接口导致 */
516
652
  update
517
653
  }
@@ -521,19 +657,26 @@ declare namespace MapProps {
521
657
  * @remarks 视野变化开始为begin,结束为end
522
658
  */
523
659
  type: T
660
+
524
661
  /** 导致视野变化的原因
525
662
  * @remarks 有效值为 gesture(手势触发)、update(接口触发或调用更新接口导致)、drag(拖动导致)、scale(缩放导致)
526
663
  */
527
- causedBy: keyof (T extends 'begin' ? RegionChangeDetail.CausedByBegin : RegionChangeDetail.CausedByEnd)
664
+ causedBy: keyof (T extends 'begin'
665
+ ? RegionChangeDetail.CausedByBegin
666
+ : RegionChangeDetail.CausedByEnd)
667
+
528
668
  /** 视野改变详情 */
529
669
  detail: regionChangeDetail<RegionChangeDetail.type>
530
670
  }
531
671
  interface regionChangeDetail<T = keyof RegionChangeDetail.type> {
532
672
  /** 旋转角度 */
533
673
  rotate: number
674
+
534
675
  /** 倾斜角度 */
535
676
  skew: number
536
- causedBy: keyof (T extends 'begin' ? RegionChangeDetail.CausedByBegin : RegionChangeDetail.CausedByEnd)
677
+ causedBy: keyof (T extends 'begin'
678
+ ? RegionChangeDetail.CausedByBegin
679
+ : RegionChangeDetail.CausedByEnd)
537
680
  type: T | string
538
681
  scale: number
539
682
  centerLocation: point
@@ -620,5 +763,4 @@ declare namespace MapProps {
620
763
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/map.html#map
621
764
  */
622
765
  declare const Map: ComponentType<MapProps>
623
-
624
766
  export { Map, MapProps }