@tarojs/components 3.5.5-alpha.1 → 3.5.6-alpha.0

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