@tarojs/components 3.6.2 → 3.6.4

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