@tarojs/components 3.5.6-alpha.2 → 3.5.7-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 (229) hide show
  1. package/dist/cjs/helper-db78e01a.js +19 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/taro-ad-core.cjs.entry.js +3 -1
  4. package/dist/cjs/taro-ad-custom-core.cjs.entry.js +3 -1
  5. package/dist/cjs/taro-camera-core.cjs.entry.js +3 -1
  6. package/dist/cjs/taro-components.cjs.js +1 -1
  7. package/dist/cjs/taro-editor-core.cjs.entry.js +3 -1
  8. package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +3 -1
  9. package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +3 -1
  10. package/dist/cjs/taro-live-player-core.cjs.entry.js +3 -1
  11. package/dist/cjs/taro-live-pusher-core.cjs.entry.js +3 -1
  12. package/dist/cjs/taro-map-core.cjs.entry.js +3 -1
  13. package/dist/cjs/taro-match-media-core.cjs.entry.js +3 -1
  14. package/dist/cjs/taro-movable-area-core.cjs.entry.js +1 -1
  15. package/dist/cjs/taro-movable-view-core.cjs.entry.js +2 -2
  16. package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +3 -1
  17. package/dist/cjs/taro-official-account-core.cjs.entry.js +3 -1
  18. package/dist/cjs/taro-open-data-core.cjs.entry.js +3 -1
  19. package/dist/cjs/taro-page-container-core.cjs.entry.js +3 -1
  20. package/dist/cjs/taro-page-meta-core.cjs.entry.js +3 -1
  21. package/dist/cjs/taro-root-portal-core.cjs.entry.js +3 -1
  22. package/dist/cjs/taro-share-element-core.cjs.entry.js +3 -1
  23. package/dist/cjs/taro-slot-core.cjs.entry.js +3 -1
  24. package/dist/cjs/taro-voip-room-core.cjs.entry.js +3 -1
  25. package/dist/collection/components/ad/ad.js +2 -2
  26. package/dist/collection/components/ad-custom/ad-custom.js +2 -2
  27. package/dist/collection/components/camera/camera.js +2 -2
  28. package/dist/collection/components/editor/editor.js +2 -2
  29. package/dist/collection/components/functional-page-navigator/functional-page-navigator.js +2 -2
  30. package/dist/collection/components/keyboard-accessory/keyboard-accessory.js +2 -2
  31. package/dist/collection/components/live-player/live-player.js +2 -2
  32. package/dist/collection/components/live-pusher/live-pusher.js +2 -2
  33. package/dist/collection/components/map/map.js +2 -2
  34. package/dist/collection/components/match-media/match-media.js +2 -2
  35. package/dist/collection/components/movable-area/area.css +2 -2
  36. package/dist/collection/components/movable-area/movable-view.js +2 -4
  37. package/dist/collection/components/navigation-bar/navigation-bar.js +2 -2
  38. package/dist/collection/components/official-account/official-account.js +2 -2
  39. package/dist/collection/components/open-data/open-data.js +2 -2
  40. package/dist/collection/components/page-container/page-container.js +2 -2
  41. package/dist/collection/components/page-meta/page-meta.js +2 -2
  42. package/dist/collection/components/root-portal/root-portal.js +2 -2
  43. package/dist/collection/components/share-element/share-element.js +2 -2
  44. package/dist/collection/components/slot/slot.js +2 -2
  45. package/dist/collection/components/voip-room/voip-room.js +2 -2
  46. package/dist/collection/utils/helper.js +10 -0
  47. package/dist/collection/utils/index.js +1 -0
  48. package/dist/esm/helper-3d0ecf0f.js +13 -0
  49. package/dist/esm/loader.js +1 -1
  50. package/dist/esm/taro-ad-core.entry.js +3 -1
  51. package/dist/esm/taro-ad-custom-core.entry.js +3 -1
  52. package/dist/esm/taro-camera-core.entry.js +3 -1
  53. package/dist/esm/taro-components.js +1 -1
  54. package/dist/esm/taro-editor-core.entry.js +3 -1
  55. package/dist/esm/taro-functional-page-navigator-core.entry.js +3 -1
  56. package/dist/esm/taro-keyboard-accessory-core.entry.js +3 -1
  57. package/dist/esm/taro-live-player-core.entry.js +3 -1
  58. package/dist/esm/taro-live-pusher-core.entry.js +3 -1
  59. package/dist/esm/taro-map-core.entry.js +3 -1
  60. package/dist/esm/taro-match-media-core.entry.js +3 -1
  61. package/dist/esm/taro-movable-area-core.entry.js +1 -1
  62. package/dist/esm/taro-movable-view-core.entry.js +3 -3
  63. package/dist/esm/taro-navigation-bar-core.entry.js +3 -1
  64. package/dist/esm/taro-official-account-core.entry.js +3 -1
  65. package/dist/esm/taro-open-data-core.entry.js +3 -1
  66. package/dist/esm/taro-page-container-core.entry.js +3 -1
  67. package/dist/esm/taro-page-meta-core.entry.js +3 -1
  68. package/dist/esm/taro-root-portal-core.entry.js +3 -1
  69. package/dist/esm/taro-share-element-core.entry.js +3 -1
  70. package/dist/esm/taro-slot-core.entry.js +3 -1
  71. package/dist/esm/taro-voip-room-core.entry.js +3 -1
  72. package/dist/esm-es5/helper-3d0ecf0f.js +1 -0
  73. package/dist/esm-es5/loader.js +1 -1
  74. package/dist/esm-es5/taro-ad-core.entry.js +1 -1
  75. package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -1
  76. package/dist/esm-es5/taro-camera-core.entry.js +1 -1
  77. package/dist/esm-es5/taro-components.js +1 -1
  78. package/dist/esm-es5/taro-editor-core.entry.js +1 -1
  79. package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -1
  80. package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -1
  81. package/dist/esm-es5/taro-live-player-core.entry.js +1 -1
  82. package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -1
  83. package/dist/esm-es5/taro-map-core.entry.js +1 -1
  84. package/dist/esm-es5/taro-match-media-core.entry.js +1 -1
  85. package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
  86. package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
  87. package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -1
  88. package/dist/esm-es5/taro-official-account-core.entry.js +1 -1
  89. package/dist/esm-es5/taro-open-data-core.entry.js +1 -1
  90. package/dist/esm-es5/taro-page-container-core.entry.js +1 -1
  91. package/dist/esm-es5/taro-page-meta-core.entry.js +1 -1
  92. package/dist/esm-es5/taro-root-portal-core.entry.js +1 -1
  93. package/dist/esm-es5/taro-share-element-core.entry.js +1 -1
  94. package/dist/esm-es5/taro-slot-core.entry.js +1 -1
  95. package/dist/esm-es5/taro-voip-room-core.entry.js +1 -1
  96. package/dist/taro-components/p-028e2728.entry.js +1 -0
  97. package/dist/taro-components/p-0380841f.system.js +1 -1
  98. package/dist/taro-components/p-06178a0c.entry.js +1 -0
  99. package/dist/taro-components/p-07294134.system.entry.js +1 -0
  100. package/dist/taro-components/p-075458e5.system.entry.js +1 -0
  101. package/dist/taro-components/p-15e45ed6.system.js +1 -0
  102. package/dist/taro-components/p-2ec47545.entry.js +1 -0
  103. package/dist/taro-components/p-3e11c8cc.system.entry.js +1 -0
  104. package/dist/taro-components/{p-f8b9c4b0.entry.js → p-42630f45.entry.js} +1 -1
  105. package/dist/taro-components/p-4cf436f9.entry.js +1 -0
  106. package/dist/taro-components/p-4d826fb7.entry.js +1 -0
  107. package/dist/taro-components/p-55266a1f.entry.js +1 -0
  108. package/dist/taro-components/p-57a2a441.entry.js +1 -0
  109. package/dist/taro-components/p-59d93770.entry.js +1 -0
  110. package/dist/taro-components/p-5a374cb9.entry.js +1 -0
  111. package/dist/taro-components/p-62fc514e.entry.js +1 -0
  112. package/dist/taro-components/p-6800ac6f.entry.js +1 -0
  113. package/dist/taro-components/p-6a96da58.js +1 -0
  114. package/dist/taro-components/p-6aa557f0.entry.js +1 -0
  115. package/dist/taro-components/p-6ad59489.system.entry.js +1 -0
  116. package/dist/taro-components/p-733cc64a.system.entry.js +1 -0
  117. package/dist/taro-components/p-7374537f.entry.js +1 -0
  118. package/dist/taro-components/p-7d329ab0.entry.js +1 -0
  119. package/dist/taro-components/p-7e960ac3.system.entry.js +1 -0
  120. package/dist/taro-components/p-8e2b048e.system.entry.js +1 -0
  121. package/dist/taro-components/p-9234cc1d.entry.js +1 -0
  122. package/dist/taro-components/p-93eed5d7.system.entry.js +1 -0
  123. package/dist/taro-components/p-9e1572c5.system.entry.js +1 -0
  124. package/dist/taro-components/p-afbcd093.entry.js +1 -0
  125. package/dist/taro-components/p-b11aaf69.system.entry.js +1 -0
  126. package/dist/taro-components/p-b1ae9401.entry.js +1 -0
  127. package/dist/taro-components/p-b60820b4.entry.js +1 -0
  128. package/dist/taro-components/p-b7681c76.system.entry.js +1 -0
  129. package/dist/taro-components/p-c5fd5c7f.system.entry.js +1 -0
  130. package/dist/taro-components/p-c92bafb6.system.entry.js +1 -0
  131. package/dist/taro-components/p-c93bb915.system.entry.js +1 -0
  132. package/dist/taro-components/p-cf048af9.entry.js +1 -0
  133. package/dist/taro-components/p-d075934f.system.entry.js +1 -0
  134. package/dist/taro-components/p-d4da725f.system.entry.js +1 -0
  135. package/dist/taro-components/p-d5f3080c.entry.js +1 -0
  136. package/dist/taro-components/p-d6662ab3.system.entry.js +1 -0
  137. package/dist/taro-components/p-f2803c2e.system.entry.js +1 -0
  138. package/dist/taro-components/p-f4ea8a56.system.entry.js +1 -0
  139. package/dist/taro-components/{p-1c775a11.system.entry.js → p-f5f1c3b7.system.entry.js} +1 -1
  140. package/dist/taro-components/p-f7c80795.system.entry.js +1 -0
  141. package/dist/taro-components/taro-components.esm.js +1 -1
  142. package/dist/types/components/ad/ad.d.ts +2 -1
  143. package/dist/types/components/ad-custom/ad-custom.d.ts +2 -1
  144. package/dist/types/components/camera/camera.d.ts +2 -1
  145. package/dist/types/components/editor/editor.d.ts +2 -1
  146. package/dist/types/components/functional-page-navigator/functional-page-navigator.d.ts +2 -1
  147. package/dist/types/components/keyboard-accessory/keyboard-accessory.d.ts +2 -1
  148. package/dist/types/components/live-player/live-player.d.ts +2 -1
  149. package/dist/types/components/live-pusher/live-pusher.d.ts +2 -1
  150. package/dist/types/components/map/map.d.ts +2 -1
  151. package/dist/types/components/match-media/match-media.d.ts +2 -1
  152. package/dist/types/components/navigation-bar/navigation-bar.d.ts +2 -1
  153. package/dist/types/components/official-account/official-account.d.ts +2 -1
  154. package/dist/types/components/open-data/open-data.d.ts +2 -1
  155. package/dist/types/components/page-container/page-container.d.ts +2 -1
  156. package/dist/types/components/page-meta/page-meta.d.ts +2 -1
  157. package/dist/types/components/root-portal/root-portal.d.ts +2 -1
  158. package/dist/types/components/share-element/share-element.d.ts +2 -1
  159. package/dist/types/components/slot/slot.d.ts +2 -1
  160. package/dist/types/components/voip-room/voip-room.d.ts +2 -1
  161. package/dist/types/utils/helper.d.ts +1 -0
  162. package/dist/types/utils/index.d.ts +1 -0
  163. package/mini/index.js +1 -0
  164. package/package.json +8 -7
  165. package/types/Ad.d.ts +0 -1
  166. package/types/Button.d.ts +3 -7
  167. package/types/Camera.d.ts +40 -8
  168. package/types/Canvas.d.ts +1 -17
  169. package/types/CoverImage.d.ts +0 -1
  170. package/types/CoverView.d.ts +0 -1
  171. package/types/Image.d.ts +0 -11
  172. package/types/Input.d.ts +3 -4
  173. package/types/LivePlayer.d.ts +6 -0
  174. package/types/Map.d.ts +13 -46
  175. package/types/MovableView.d.ts +21 -33
  176. package/types/NavigationBar.d.ts +1 -1
  177. package/types/PageContainer.d.ts +1 -4
  178. package/types/Picker.d.ts +1 -5
  179. package/types/PickerView.d.ts +2 -14
  180. package/types/ScrollView.d.ts +22 -23
  181. package/types/Swiper.d.ts +0 -9
  182. package/types/Switch.d.ts +0 -1
  183. package/types/Textarea.d.ts +0 -2
  184. package/types/Video.d.ts +14 -18
  185. package/types/View.d.ts +1 -20
  186. package/types/VoipRoom.d.ts +1 -1
  187. package/types/WebView.d.ts +6 -0
  188. package/dist/collection/utils/json-schema-to-types.js +0 -224
  189. package/dist/taro-components/p-0414632d.system.entry.js +0 -1
  190. package/dist/taro-components/p-10e5df98.system.entry.js +0 -1
  191. package/dist/taro-components/p-14058364.system.entry.js +0 -1
  192. package/dist/taro-components/p-1a638246.system.entry.js +0 -1
  193. package/dist/taro-components/p-1e530acd.entry.js +0 -1
  194. package/dist/taro-components/p-22e33350.entry.js +0 -1
  195. package/dist/taro-components/p-24a66088.system.entry.js +0 -1
  196. package/dist/taro-components/p-2fd0250d.system.entry.js +0 -1
  197. package/dist/taro-components/p-3c7cdf6f.entry.js +0 -1
  198. package/dist/taro-components/p-410d449f.entry.js +0 -1
  199. package/dist/taro-components/p-443fb8b0.entry.js +0 -1
  200. package/dist/taro-components/p-44fa48b9.system.entry.js +0 -1
  201. package/dist/taro-components/p-481a8bc1.system.entry.js +0 -1
  202. package/dist/taro-components/p-49b64020.entry.js +0 -1
  203. package/dist/taro-components/p-4e8d4a72.system.entry.js +0 -1
  204. package/dist/taro-components/p-4f0e98c0.system.entry.js +0 -1
  205. package/dist/taro-components/p-4f805045.entry.js +0 -1
  206. package/dist/taro-components/p-5e3bd0db.system.entry.js +0 -1
  207. package/dist/taro-components/p-6da73376.entry.js +0 -1
  208. package/dist/taro-components/p-7325d380.entry.js +0 -1
  209. package/dist/taro-components/p-77ad7941.entry.js +0 -1
  210. package/dist/taro-components/p-7ab91097.entry.js +0 -1
  211. package/dist/taro-components/p-7b96cec3.system.entry.js +0 -1
  212. package/dist/taro-components/p-7e23b551.entry.js +0 -1
  213. package/dist/taro-components/p-7f0a12a9.entry.js +0 -1
  214. package/dist/taro-components/p-840ef0c3.system.entry.js +0 -1
  215. package/dist/taro-components/p-89c876a6.system.entry.js +0 -1
  216. package/dist/taro-components/p-90a6c15a.entry.js +0 -1
  217. package/dist/taro-components/p-95a36917.entry.js +0 -1
  218. package/dist/taro-components/p-9965cf11.system.entry.js +0 -1
  219. package/dist/taro-components/p-9fcb40a3.entry.js +0 -1
  220. package/dist/taro-components/p-a8c9b126.system.entry.js +0 -1
  221. package/dist/taro-components/p-aa5d45de.system.entry.js +0 -1
  222. package/dist/taro-components/p-b3693ca2.system.entry.js +0 -1
  223. package/dist/taro-components/p-b83c3eca.system.entry.js +0 -1
  224. package/dist/taro-components/p-c0c8b2be.entry.js +0 -1
  225. package/dist/taro-components/p-c8da5c10.entry.js +0 -1
  226. package/dist/taro-components/p-d72075ef.system.entry.js +0 -1
  227. package/dist/taro-components/p-db1f2db7.entry.js +0 -1
  228. package/dist/taro-components/p-e3f39099.entry.js +0 -1
  229. package/dist/types/utils/json-schema-to-types.d.ts +0 -25
package/types/Input.d.ts CHANGED
@@ -30,7 +30,7 @@ interface InputProps extends StandardProps, FormItemProps {
30
30
 
31
31
  /** 指定 placeholder 的样式类
32
32
  * @default "input-placeholder"
33
- * @supported weapp, alipay, swan, tt, qq, jd
33
+ * @supported weapp, alipay, swan, qq, jd
34
34
  */
35
35
  placeholderClass?: string
36
36
 
@@ -75,7 +75,7 @@ interface InputProps extends StandardProps, FormItemProps {
75
75
 
76
76
  /** 点击键盘右下角按钮时是否保持键盘不收起
77
77
  * @default false
78
- * @supported weapp, alipay, swan, tt, qq, jd
78
+ * @supported weapp, alipay, swan, qq, jd
79
79
  */
80
80
  confirmHold?: boolean
81
81
 
@@ -104,7 +104,7 @@ interface InputProps extends StandardProps, FormItemProps {
104
104
 
105
105
  /** focus 时,点击页面的时候不收起键盘
106
106
  * @default false
107
- * @supported weapp, tt
107
+ * @supported weapp
108
108
  */
109
109
  holdKeyboard?: boolean
110
110
 
@@ -202,7 +202,6 @@ interface InputProps extends StandardProps, FormItemProps {
202
202
  name?: string
203
203
 
204
204
  /** 是否强制使用系统键盘和 Web-view 创建的 input 元素。为 true 时,confirm-type、confirm-hold 可能失效。
205
- * 版本要求:基础库 2.7.3 及以上
206
205
  * @supported alipay
207
206
  */
208
207
  alwaysSystem?: string
@@ -136,6 +136,12 @@ interface LivePlayerProps extends StandardProps {
136
136
  * @supported swan
137
137
  */
138
138
  id?: string
139
+
140
+ /** 是否开启手机横屏时自动全屏,当系统设置开启自动旋转时生效
141
+ * @supported weapp
142
+ * @default false
143
+ */
144
+ enableAutoRotation?: string
139
145
  }
140
146
  declare namespace LivePlayerProps {
141
147
  /** mode 的合法值 */
package/types/Map.d.ts CHANGED
@@ -188,9 +188,7 @@ interface MapProps extends StandardProps {
188
188
  /** 视野发生变化时触发
189
189
  * @supported weapp, alipay, swan, tt, qq, jd
190
190
  */
191
- onRegionChange?: CommonEventFunction<
192
- MapProps.onRegionEventDetail<'begin'> | MapProps.onRegionEventDetail<'end'>
193
- >
191
+ onRegionChange?: CommonEventFunction<MapProps.onRegionEventDetail<'begin'> | MapProps.onRegionEventDetail<'end'>>
194
192
 
195
193
  /** 点击地图poi点时触发,e.detail = {name, longitude, latitude}
196
194
  * @supported weapp, swan, qq
@@ -200,9 +198,7 @@ interface MapProps extends StandardProps {
200
198
  /** 视野在地图 padding 范围内展示
201
199
  * @supported alipay
202
200
  */
203
- includePadding?: {
204
- [key in 'left' | 'right' | 'top' | 'bottom']: number | string
205
- }
201
+ includePadding?: { [key in 'left' | 'right' | 'top' | 'bottom']: number | string }
206
202
 
207
203
  /** 覆盖物,自定义贴图
208
204
  * @supported alipay
@@ -234,19 +230,7 @@ interface MapProps extends StandardProps {
234
230
  */
235
231
  onAnchorPointTap?: CommonEventFunction
236
232
 
237
- /** 内联样式。
238
- * @supported alipay
239
- */
240
- style?: string
241
-
242
- /** 样式名。
243
- * @supported alipay
244
- */
245
- class?: string
246
-
247
233
  /** 覆盖物,多边形。
248
- *
249
- * 版本要求:基础库 1.10.0 及以上
250
234
  * @supported alipay
251
235
  */
252
236
  polygon?: string
@@ -255,37 +239,24 @@ interface MapProps extends StandardProps {
255
239
  *
256
240
  * default:默认样式
257
241
  * light:精简样式
258
- *
259
- * 版本要求:基础库 1.20.0 及以上
260
242
  * @supported alipay
261
243
  */
262
244
  customMapStyle?: string
263
245
 
264
246
  /** 基于 map 高级定制渲染,设置覆盖在地图上的 view。
265
- *
266
- * 版本要求:基础库 1.23.0 及以上
267
247
  * @supported alipay
268
248
  */
269
249
  panels?: string
270
250
 
271
251
  /** 点击 panel 时触发。
272
- *
273
- * {
274
- *
275
- *    panelId,
276
- *
277
- *    layoutId,
278
- *
279
- * }
280
- *
281
- * 版本要求:基础库 1.23.0 及以上
282
252
  * @supported alipay
283
253
  */
284
- onPanelTap?: CommonEventFunction
254
+ onPanelTap?: CommonEventFunction<{
255
+ panelId
256
+ layoutId
257
+ }>
285
258
 
286
259
  /** 地图初始化完成即将开始渲染第一帧时触发。
287
- *
288
- * 版本要求:基础库 2.7.2 及以上
289
260
  * @supported alipay
290
261
  */
291
262
  onInitComplete?: CommonEventFunction
@@ -295,16 +266,16 @@ interface MapProps extends StandardProps {
295
266
  */
296
267
  theme?: string
297
268
 
298
- /** 内联样式。
299
- * @supported alipay
300
- */
301
- optimize?: string
302
-
303
269
  /** 展示3D楼块
304
270
  * @supported weapp, swan, tt, qq
305
271
  * @default false
306
272
  */
307
273
  enable3D?: string
274
+
275
+ /** 内联样式。
276
+ * @supported alipay
277
+ */
278
+ optimize?: string
308
279
  }
309
280
  declare namespace MapProps {
310
281
  /** 标记点用于在地图上显示标记的位置 */
@@ -661,9 +632,7 @@ declare namespace MapProps {
661
632
  /** 导致视野变化的原因
662
633
  * @remarks 有效值为 gesture(手势触发)、update(接口触发或调用更新接口导致)、drag(拖动导致)、scale(缩放导致)
663
634
  */
664
- causedBy: keyof (T extends 'begin'
665
- ? RegionChangeDetail.CausedByBegin
666
- : RegionChangeDetail.CausedByEnd)
635
+ causedBy: keyof (T extends 'begin' ? RegionChangeDetail.CausedByBegin : RegionChangeDetail.CausedByEnd)
667
636
 
668
637
  /** 视野改变详情 */
669
638
  detail: regionChangeDetail<RegionChangeDetail.type>
@@ -674,9 +643,7 @@ declare namespace MapProps {
674
643
 
675
644
  /** 倾斜角度 */
676
645
  skew: number
677
- causedBy: keyof (T extends 'begin'
678
- ? RegionChangeDetail.CausedByBegin
679
- : RegionChangeDetail.CausedByEnd)
646
+ causedBy: keyof (T extends 'begin' ? RegionChangeDetail.CausedByBegin : RegionChangeDetail.CausedByEnd)
680
647
  type: T | string
681
648
  scale: number
682
649
  centerLocation: point
@@ -1,9 +1,5 @@
1
1
  import { ComponentType } from 'react'
2
- import {
3
- StandardProps,
4
- CommonEventFunction,
5
- TouchEventFunction,
6
- } from './common'
2
+ import { StandardProps, CommonEventFunction, TouchEventFunction } from './common'
7
3
  interface MovableViewProps extends Omit<StandardProps, 'animation'> {
8
4
  /** movable-view 的移动方向,属性值有`all`、`vertical`、`horizontal`、`none`
9
5
  * @default none
@@ -86,10 +82,10 @@ interface MovableViewProps extends Omit<StandardProps, 'animation'> {
86
82
  */
87
83
  onChange?: CommonEventFunction<MovableViewProps.onChangeEventDetail>
88
84
 
89
- /** 缩放过程中触发的事件
90
- * @supported weapp, alipay, swan, tt, qq
85
+ /** 拖动结束触发的事件
86
+ * @supported alipay
91
87
  */
92
- onScale?: CommonEventFunction<MovableViewProps.onScaleEventDetail>
88
+ onChangeEnd?: CommonEventFunction<MovableViewProps.onChangeEventDetail>
93
89
 
94
90
  /** 开始拖动时触发
95
91
  * @supported rn
@@ -101,64 +97,56 @@ interface MovableViewProps extends Omit<StandardProps, 'animation'> {
101
97
  */
102
98
  onDragEnd?: CommonEventFunction
103
99
 
104
- /** 初次手指触摸后移动为横向的移动时触发,如果 catch 此事件,则意味着 touchmove 事件也被catch
105
- * @supported weapp, tt
100
+ /** 缩放过程中触发的事件
101
+ * @supported weapp, alipay, swan, tt, qq
106
102
  */
107
- catchTouchmove?: CommonEventFunction
103
+ onScale?: CommonEventFunction<MovableViewProps.onScaleEventDetail>
108
104
 
109
105
  /** 触摸动作开始,事件会向父节点传递。
110
- * 版本要求: 基础库 1.11.5 及以上
111
106
  * @supported alipay
112
107
  */
113
108
  onTouchStart?: CommonEventFunction
114
109
 
115
110
  /** 触摸动作开始,事件仅作用于组件,不向父节点传递。
116
- * 版本要求: 基础库 1.11.5 及以上
117
111
  * @supported alipay
118
112
  */
119
- catchTouchStart?: CommonEventFunction
113
+ onTouchMove?: CommonEventFunction
120
114
 
121
- /** 触摸移动事件,事件会向父节点传递。
122
- * 版本要求: 基础库 1.11.5 及以上
115
+ /** 手指触摸动作结束
116
+ * @supported alipay, h5
117
+ * @h5 此事件的触发顺序会因为当前事件机制引起组件内外注册的事件执行顺序不正常,外部注册的事件可能会优先于内部执行,如需保证执行顺序一致,需要在回调函数中包裹 setTimeout 临时处理
118
+ */
119
+ onTouchEnd?: TouchEventFunction
120
+
121
+ /** 触摸动作被打断,如来电提醒、弹窗。
123
122
  * @supported alipay
124
123
  */
125
- onTouchMove?: CommonEventFunction
124
+ onTouchCancel?: CommonEventFunction
126
125
 
127
126
  /** 初次手指触摸后移动为横向的移动,如果 catch 此事件,则意味着 touchmove 事件也被 catch
128
- * @supported swan
127
+ * @supported weapp, swan, tt
129
128
  */
130
129
  onHTouchMove?: TouchEventFunction
131
130
 
132
131
  /** 初次手指触摸后移动为纵向的移动,如果 catch 此事件,则意味着 touchmove 事件也被 catch
133
- * @supported swan
132
+ * @supported weapp, swan, tt
134
133
  */
135
134
  onVTouchMove?: TouchEventFunction
136
135
 
137
136
  /** 触摸移动事件,事件仅作用于组件,不向父节点传递。
138
- * 版本要求: 基础库 1.11.5 及以上
139
137
  * @supported alipay
140
138
  */
141
- catchTouchMove?: CommonEventFunction
139
+ catchTouchStart?: CommonEventFunction
142
140
 
143
- /** 触摸动作结束,事件会向父节点传递。
141
+ /** 触摸移动事件,事件仅作用于组件,不向父节点传递。
144
142
  * @supported alipay
145
143
  */
146
- onTouchEnd?: CommonEventFunction
144
+ catchTouchMove?: CommonEventFunction
147
145
 
148
146
  /** 触摸动作结束,事件仅作用于组件,不向父节点传递。
149
147
  * @supported alipay
150
148
  */
151
149
  catchTouchEnd?: CommonEventFunction
152
-
153
- /** 触摸动作被打断,如来电提醒、弹窗。
154
- * @supported alipay
155
- */
156
- onTouchCancel?: CommonEventFunction
157
-
158
- /** 拖动结束触发的事件
159
- * @supported alipay
160
- */
161
- onChangeEnd?: CommonEventFunction<MovableViewProps.onChangeEventDetail>
162
150
  }
163
151
  declare namespace MovableViewProps {
164
152
  /** 拖动过程中触发的事件 */
@@ -37,7 +37,7 @@ interface NavigationBarProps extends StandardProps {
37
37
  /** 页面导航条配置节点,用于指定导航栏的一些属性。只能是 PageMeta 组件内的第一个节点,需要配合它一同使用。
38
38
  * 通过这个节点可以获得类似于调用 Taro.setNavigationBarTitle Taro.setNavigationBarColor 等接口调用的效果。
39
39
  * @supported weapp
40
- * @see https://developers.weixin.qq.com/miniprogram/dev/component/open-data.html
40
+ * @see https://developers.weixin.qq.com/miniprogram/dev/component/navigation-bar.html
41
41
  */
42
42
  declare const NavigationBar: ComponentType<NavigationBarProps>
43
43
  export { NavigationBar, NavigationBarProps }
@@ -1,8 +1,5 @@
1
1
  import { ComponentType } from 'react'
2
- import {
3
- StandardProps,
4
- CommonEventFunction,
5
- } from './common'
2
+ import { StandardProps, CommonEventFunction } from './common'
6
3
  interface PageContainerProps extends StandardProps {
7
4
  /** 是否显示容器组件
8
5
  * @default false
package/types/Picker.d.ts CHANGED
@@ -436,11 +436,7 @@ declare namespace PickerRegionProps {
436
436
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/picker.html
437
437
  */
438
438
  declare const Picker: ComponentType<
439
- | PickerMultiSelectorProps
440
- | PickerTimeProps
441
- | PickerDateProps
442
- | PickerRegionProps
443
- | PickerSelectorProps
439
+ PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps
444
440
  >
445
441
  export {
446
442
  Picker,
@@ -38,12 +38,12 @@ interface PickerViewProps extends StandardProps {
38
38
  onChange?: CommonEventFunction<PickerViewProps.onChangeEventDetail>
39
39
 
40
40
  /** 当滚动选择开始时候触发事件
41
- * @supported weapp, tt, qq
41
+ * @supported weapp, alipay, tt, qq
42
42
  */
43
43
  onPickStart?: CommonEventFunction
44
44
 
45
45
  /** 当滚动选择结束时候触发事件
46
- * @supported weapp, tt, qq
46
+ * @supported weapp, alipay, tt, qq
47
47
  */
48
48
  onPickEnd?: CommonEventFunction
49
49
 
@@ -56,18 +56,6 @@ interface PickerViewProps extends StandardProps {
56
56
  * @supported qq
57
57
  */
58
58
  ariaLabel?: string
59
-
60
- /** 当滚动选择开始时候触发事件。
61
- * 版本要求: 基础库 2.7.23 及以上
62
- * @supported alipay
63
- */
64
- onPickerStart?: CommonEventFunction
65
-
66
- /** 当滚动选择结束时候触发事件。
67
- * 版本要求: 基础库 2.7.23 及以上
68
- * @supported alipay
69
- */
70
- onPickerEnd?: CommonEventFunction
71
59
  }
72
60
  declare namespace PickerViewProps {
73
61
  interface onChangeEventDetail {
@@ -164,73 +164,55 @@ interface ScrollViewProps extends StandardProps {
164
164
  /** 滑动开始事件 (同时开启 enhanced 属性后生效)
165
165
  * @supported weapp
166
166
  */
167
- onDragStart?: CommonEventFunction
167
+ onDragStart?: CommonEventFunction<ScrollViewProps.onDragDetail>
168
168
 
169
169
  /** 滑动事件 (同时开启 enhanced 属性后生效)
170
170
  * @supported weapp
171
171
  */
172
- onDragging?: CommonEventFunction
172
+ onDragging?: CommonEventFunction<ScrollViewProps.onDragDetail>
173
173
 
174
- /** 滑动结束事件 (同时开启 enhanced 属性后生效) detail { scrollTop, scrollLeft, velocity }
174
+ /** 滑动结束事件 (同时开启 enhanced 属性后生效)
175
175
  * @supported weapp
176
176
  */
177
- onDragend?: CommonEventFunction
178
-
179
- /** 外部样式名。
180
- * @supported alipay
181
- */
182
- class?: string
183
-
184
- /** 内联样式名。
185
- * @supported alipay
186
- */
187
- style?: string
177
+ onDragEnd?: CommonEventFunction<ScrollViewProps.onDragDetail>
188
178
 
189
179
  /** 当 scroll-with-animation设置为 true 时,可以设置 scroll-animation-duration 来控制动画的执行时间,单位 ms。
190
- * 版本要求: 基础库 1.9.0 及以上
191
180
  * @supported alipay
192
181
  */
193
182
  scrollAnimationDuration?: string
194
183
 
195
184
  /** 纵向滚动时,当滚动到顶部或底部时,强制禁止触发页面滚动,仍然只触发 scroll-view 自身的滚动。
196
- * 默认值: false
197
- * 版本要求: 基础库 1.11.2 及以上
198
185
  * @supported alipay
186
+ * @default false
199
187
  */
200
188
  trapScroll?: string
201
189
 
202
190
  /** 触摸动作开始。
203
- * 版本要求: 基础库 1.15.0 及以上
204
191
  * @supported alipay
205
192
  */
206
193
  onTouchStart?: CommonEventFunction
207
194
 
208
195
  /** 触摸后移动。
209
- * 版本要求: 基础库 1.15.0 及以上
210
196
  * @supported alipay
211
197
  */
212
198
  onTouchMove?: CommonEventFunction
213
199
 
214
200
  /** 触摸动作结束。
215
- * 版本要求: 基础库 1.15.0 及以上
216
201
  * @supported alipay
217
202
  */
218
203
  onTouchEnd?: CommonEventFunction
219
204
 
220
205
  /** 触摸动作被打断,如来电提醒、弹窗。
221
- * 版本要求: 基础库 1.15.0 及以上
222
206
  * @supported alipay
223
207
  */
224
208
  onTouchCancel?: CommonEventFunction
225
209
 
226
210
  /** 发生滚动前,对滚动方向进行判断,当方向是顶部/左边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到顶部/左边,禁止滚动。
227
- * 版本要求:基础库 2.6.2 及以上
228
211
  * @supported alipay
229
212
  */
230
213
  disableLowerScroll?: string
231
214
 
232
215
  /** 发生滚动前,对滚动方向进行判断,当方向是底部/右边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到底部/右边,禁止滚动。
233
- * 版本要求:基础库 2.6.2 及以上
234
216
  * @supported alipay
235
217
  */
236
218
  disableUpperScroll?: string
@@ -239,6 +221,12 @@ interface ScrollViewProps extends StandardProps {
239
221
  * @supported qq
240
222
  */
241
223
  ariaLabel?: string
224
+
225
+ /** 开启 passive 特性,能优化一定的滚动性能
226
+ * @supported weapp
227
+ * @default false
228
+ */
229
+ enablePassive?: string
242
230
  }
243
231
  declare namespace ScrollViewProps {
244
232
  interface onScrollDetail {
@@ -256,6 +244,17 @@ declare namespace ScrollViewProps {
256
244
  deltaX: number
257
245
  deltaY: number
258
246
  }
247
+
248
+ interface onDragDetail {
249
+ /** 横向滚动条位置 */
250
+ scrollLeft: number
251
+
252
+ /** 竖向滚动条位置 */
253
+ scrollTop: number
254
+
255
+ /** 滚动速度 */
256
+ velocity: number
257
+ }
259
258
  }
260
259
 
261
260
  /** 可滚动视图区域。使用竖向滚动时,需要给scroll-view一个固定高度,通过 WXSS 设置 height。组件属性的长度单位默认为 px
package/types/Swiper.d.ts CHANGED
@@ -119,26 +119,22 @@ interface SwiperProps extends StandardProps {
119
119
  disableTouch?: boolean
120
120
 
121
121
  /** swiper-item 可见时的 class。
122
- * 版本要求: 基础库 1.13.7 以及上。
123
122
  * @supported alipay
124
123
  */
125
124
  activeClass?: string
126
125
 
127
126
  /** acceleration 设置为 {{true}} 时且处于滑动过程中,中间若干屏处于可见时的 class。
128
- * 版本要求: 基础库 1.13.7 以及上。
129
127
  * @supported alipay
130
128
  */
131
129
  changingClass?: string
132
130
 
133
131
  /** 当开启时,会根据滑动速度,连续滑动多屏。
134
- * 版本要求: 基础库 1.13.7 及以上
135
132
  * @default false
136
133
  * @supported alipay
137
134
  */
138
135
  acceleration?: string
139
136
 
140
137
  /** 是否禁用代码变动触发 swiper 切换时使用动画。
141
- * 版本要求: 基础库 1.13.7 及以上
142
138
  * @default false
143
139
  * @supported alipay
144
140
  */
@@ -150,31 +146,26 @@ interface SwiperProps extends StandardProps {
150
146
  onAnimationEnd?: CommonEventFunction<SwiperProps.onCommonEventDetail>
151
147
 
152
148
  /** 滑动距离阈值,当滑动距离超过阈值时进行 swiper-item 切换。
153
- * 版本要求:基础库 1.24.11 及以上
154
149
  * @supported alipay
155
150
  */
156
151
  swipeRatio?: string
157
152
 
158
153
  /** 滑动综合速度阈值,当超过阈值时进行 swiper-item 切换,数值越小越敏感。
159
- * 版本要求:基础库 1.24.11 及以上
160
154
  * @supported alipay
161
155
  */
162
156
  swipeSpeed?: string
163
157
 
164
158
  /** 计算用户手势时所依赖的滑动角度。角度根据 touchstart 事件和首次 touchmove 事件的坐标计算得出。数值越小越对用户的滑动方向准确度要求越高。
165
- * 版本要求:基础库 1.24.11 及以上
166
159
  * @supported alipay
167
160
  */
168
161
  touchAngle?: string
169
162
 
170
163
  /** 自动以指定滑块的高度为整个容器的高度。当 vertical 为 true 时,默认不调整。可选值为:
171
- * 版本要求:基础库 2.6.4 及以上
172
164
  * @supported alipay
173
165
  */
174
166
  adjustHeight?: 'first' | 'current' | 'highest' | 'none'
175
167
 
176
168
  /** vertical 为 true 时强制使 adjust-height 生效。
177
- * 版本要求:基础库 2.6.4 及以上
178
169
  * @supported alipay
179
170
  */
180
171
  adjustVerticalHeight?: string
package/types/Switch.d.ts CHANGED
@@ -41,7 +41,6 @@ interface SwitchProps extends StandardProps, FormItemProps {
41
41
  name?: string
42
42
 
43
43
  /** 是否为受控组件,为 true 时,checked 会完全受 setData 控制。
44
- * 版本要求: 基础库 1.8.0 及以上
45
44
  * @default false
46
45
  * @supported alipay
47
46
  */
@@ -159,13 +159,11 @@ interface TextareaProps extends StandardProps, FormItemProps {
159
159
  name?: string
160
160
 
161
161
  /** 是否渲染字数统计功能(是否删除默认计数器/是否显示字数统计)。
162
- * 版本要求: 基础库 1.8.0 及以上
163
162
  * @supported alipay
164
163
  */
165
164
  showCount?: string
166
165
 
167
166
  /** 是否为受控组件。为 true 时,value 内容会完全受 setData 控制。
168
- * 版本要求: 基础库 1.8.0 及以上
169
167
  * @supported alipay
170
168
  */
171
169
  controlled?: string
package/types/Video.d.ts CHANGED
@@ -336,23 +336,12 @@ interface VideoProps extends StandardProps {
336
336
  */
337
337
  onControlsToggle?: CommonEventFunction<VideoProps.onControlsToggleEventDetail>
338
338
 
339
- /** 内联样式。
340
- * @supported alipay
341
- */
342
- style?: string
343
-
344
- /** 外部样式名。
345
- * @supported alipay
346
- */
347
- class?: string
348
-
349
339
  /** 当 poster 高宽比跟视频高宽不匹配时,如何显示 poster,设置规则同 background-size 一致。
350
340
  * @supported alipay
351
341
  */
352
342
  posterSize?: string
353
343
 
354
344
  /** 当底部工具条隐藏时,是否显示细进度条(controls=false 时设置无效)。
355
- * 版本要求: 基础库 1.15.0 及以上
356
345
  * @supported alipay
357
346
  */
358
347
  showThinProgressBar?: string
@@ -364,7 +353,6 @@ interface VideoProps extends StandardProps {
364
353
  * 2 - 阻塞提醒(无消耗流量大小)
365
354
  * 3 - 阻塞提醒(有消耗流量大小提醒)
366
355
  *
367
- * 版本要求: 基础库 1.13.0 及以上
368
356
  * @supported alipay, jd
369
357
  */
370
358
  mobilenetHintType?: string
@@ -385,13 +373,11 @@ interface VideoProps extends StandardProps {
385
373
  onUserAction?: CommonEventFunction<VideoProps.onUserActionEventDetail>
386
374
 
387
375
  /** 视频播放终止。
388
- * 版本要求: 基础库 1.9.0 及以上
389
376
  * @supported alipay
390
377
  */
391
378
  onStop?: CommonEventFunction
392
379
 
393
380
  /** 当视频加载完真正开始播放时触发。
394
- * 版本要求: 基础库 1.13.6 及以上
395
381
  * @supported alipay
396
382
  */
397
383
  onRenderStart?: CommonEventFunction
@@ -401,7 +387,6 @@ interface VideoProps extends StandardProps {
401
387
  *
402
388
  * none:无浮窗。
403
389
  * page:页面内浮窗。
404
- * 版本要求:基础库 1.24.6 及以上
405
390
  * @supported alipay
406
391
  */
407
392
  floatingMode?: string
@@ -479,17 +464,23 @@ interface VideoProps extends StandardProps {
479
464
  /** 视频倍速改变完成时触发。返回改变后的倍速值
480
465
  * @supported tt
481
466
  */
482
- onPlayBackRateChange?: CommonEventFunction<{ playbackRate: string }>
467
+ onPlayBackRateChange?: CommonEventFunction<{
468
+ playbackRate: string
469
+ }>
483
470
 
484
471
  /** 静音状态改变完成时触发。返回当前是否静音
485
472
  * @supported tt
486
473
  */
487
- onMuteChange?: CommonEventFunction<{ isMuted: boolean }>
474
+ onMuteChange?: CommonEventFunction<{
475
+ isMuted: boolean
476
+ }>
488
477
 
489
478
  /** 点击控件时触发。返回当前点击的控件类型
490
479
  * @supported tt
491
480
  */
492
- onControlTap?: CommonEventFunction<{ controlType }>
481
+ onControlTap?: CommonEventFunction<{
482
+ controlType
483
+ }>
493
484
 
494
485
  /** 进入小窗播放时触发
495
486
  * @supported tt
@@ -622,14 +613,19 @@ declare namespace VideoProps {
622
613
  interface UserActionTag {
623
614
  /** 底部播放按钮 */
624
615
  play
616
+
625
617
  /** 中心播放按钮 */
626
618
  centerplay
619
+
627
620
  /** 静音按钮 */
628
621
  mute
622
+
629
623
  /** 全屏按钮 */
630
624
  fullscreen
625
+
631
626
  /** 重试按钮 */
632
627
  retry
628
+
633
629
  /** 网络提醒的播放按钮 */
634
630
  mobilenetplay
635
631
  }