@tarojs/components 3.5.6 → 3.5.7-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 (240) 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 +20 -21
  166. package/types/Audio.d.ts +5 -5
  167. package/types/Button.d.ts +67 -71
  168. package/types/Camera.d.ts +39 -8
  169. package/types/Canvas.d.ts +22 -38
  170. package/types/Checkbox.d.ts +7 -7
  171. package/types/CoverImage.d.ts +15 -16
  172. package/types/CoverView.d.ts +5 -6
  173. package/types/Form.d.ts +10 -10
  174. package/types/Image.d.ts +20 -31
  175. package/types/Input.d.ts +23 -24
  176. package/types/LivePlayer.d.ts +31 -25
  177. package/types/LivePusher.d.ts +5 -5
  178. package/types/Map.d.ts +66 -99
  179. package/types/MovableView.d.ts +21 -33
  180. package/types/NavigationBar.d.ts +1 -1
  181. package/types/Navigator.d.ts +10 -10
  182. package/types/OpenData.d.ts +5 -5
  183. package/types/PageContainer.d.ts +7 -10
  184. package/types/PageMeta.d.ts +14 -14
  185. package/types/Picker.d.ts +1 -5
  186. package/types/PickerView.d.ts +11 -23
  187. package/types/Progress.d.ts +5 -5
  188. package/types/RadioGroup.d.ts +5 -5
  189. package/types/RichText.d.ts +17 -17
  190. package/types/ScrollView.d.ts +46 -48
  191. package/types/Slider.d.ts +10 -10
  192. package/types/Swiper.d.ts +20 -29
  193. package/types/Switch.d.ts +5 -6
  194. package/types/Textarea.d.ts +32 -34
  195. package/types/Video.d.ts +119 -123
  196. package/types/View.d.ts +13 -32
  197. package/types/VoipRoom.d.ts +5 -5
  198. package/types/WebView.d.ts +11 -5
  199. package/dist/collection/utils/json-schema-to-types.js +0 -224
  200. package/dist/taro-components/p-0414632d.system.entry.js +0 -1
  201. package/dist/taro-components/p-10e5df98.system.entry.js +0 -1
  202. package/dist/taro-components/p-14058364.system.entry.js +0 -1
  203. package/dist/taro-components/p-1a638246.system.entry.js +0 -1
  204. package/dist/taro-components/p-1e530acd.entry.js +0 -1
  205. package/dist/taro-components/p-22e33350.entry.js +0 -1
  206. package/dist/taro-components/p-24a66088.system.entry.js +0 -1
  207. package/dist/taro-components/p-2fd0250d.system.entry.js +0 -1
  208. package/dist/taro-components/p-3c7cdf6f.entry.js +0 -1
  209. package/dist/taro-components/p-410d449f.entry.js +0 -1
  210. package/dist/taro-components/p-443fb8b0.entry.js +0 -1
  211. package/dist/taro-components/p-44fa48b9.system.entry.js +0 -1
  212. package/dist/taro-components/p-481a8bc1.system.entry.js +0 -1
  213. package/dist/taro-components/p-49b64020.entry.js +0 -1
  214. package/dist/taro-components/p-4e8d4a72.system.entry.js +0 -1
  215. package/dist/taro-components/p-4f0e98c0.system.entry.js +0 -1
  216. package/dist/taro-components/p-4f805045.entry.js +0 -1
  217. package/dist/taro-components/p-5e3bd0db.system.entry.js +0 -1
  218. package/dist/taro-components/p-6da73376.entry.js +0 -1
  219. package/dist/taro-components/p-7325d380.entry.js +0 -1
  220. package/dist/taro-components/p-77ad7941.entry.js +0 -1
  221. package/dist/taro-components/p-7ab91097.entry.js +0 -1
  222. package/dist/taro-components/p-7b96cec3.system.entry.js +0 -1
  223. package/dist/taro-components/p-7e23b551.entry.js +0 -1
  224. package/dist/taro-components/p-7f0a12a9.entry.js +0 -1
  225. package/dist/taro-components/p-840ef0c3.system.entry.js +0 -1
  226. package/dist/taro-components/p-89c876a6.system.entry.js +0 -1
  227. package/dist/taro-components/p-90a6c15a.entry.js +0 -1
  228. package/dist/taro-components/p-95a36917.entry.js +0 -1
  229. package/dist/taro-components/p-9965cf11.system.entry.js +0 -1
  230. package/dist/taro-components/p-9fcb40a3.entry.js +0 -1
  231. package/dist/taro-components/p-a8c9b126.system.entry.js +0 -1
  232. package/dist/taro-components/p-aa5d45de.system.entry.js +0 -1
  233. package/dist/taro-components/p-b3693ca2.system.entry.js +0 -1
  234. package/dist/taro-components/p-b83c3eca.system.entry.js +0 -1
  235. package/dist/taro-components/p-c0c8b2be.entry.js +0 -1
  236. package/dist/taro-components/p-c8da5c10.entry.js +0 -1
  237. package/dist/taro-components/p-d72075ef.system.entry.js +0 -1
  238. package/dist/taro-components/p-db1f2db7.entry.js +0 -1
  239. package/dist/taro-components/p-e3f39099.entry.js +0 -1
  240. package/dist/types/utils/json-schema-to-types.d.ts +0 -25
package/types/Button.d.ts CHANGED
@@ -132,10 +132,74 @@ interface ButtonProps extends StandardProps {
132
132
  */
133
133
  showMessageCard?: boolean
134
134
 
135
+ /** 生活号 id,必须是当前小程序同主体且已关联的生活号,open-type="lifestyle" 时有效。
136
+ * @supported alipay, qq
137
+ */
138
+ publicId?: string
139
+
140
+ /** 发送订阅类模板消息所用的模板库标题 ID ,可通过 getTemplateLibraryList 获取
141
+ * 当参数类型为 Array 时,可传递 1~3 个模板库标题 ID
142
+ * @supported swan
143
+ */
144
+ templateId?: string | Array<string>
145
+
146
+ /** 发送订阅类模板消息时所使用的唯一标识符,内容由开发者自定义,用来标识订阅场景
147
+ * 注意:同一用户在同一 subscribe-id 下的多次授权不累积下发权限,只能下发一条。若要订阅多条,需要不同 subscribe-id
148
+ * @supported swan
149
+ */
150
+ subscribeId?: string
151
+
152
+ /** 打开群资料卡时,传递的群号
153
+ * @supported qq
154
+ */
155
+ groupId?: string
156
+
157
+ /** 打开频道页面时,传递的频道号
158
+ * @supported qq
159
+ */
160
+ guildId?: string
161
+
162
+ /** 分享类型集合,请参考下面share-type有效值说明。share-type后续将不再维护,请更新为share-mode
163
+ * @supported qq
164
+ * @default 27
165
+ */
166
+ shareType?: string
167
+
168
+ /** 分享类型集合,请参考下面share-mode有效值说明
169
+ * @supported qq
170
+ * @default ['qq', 'qzone']
171
+ */
172
+ shareMode?: string
173
+
174
+ /** 无障碍访问,(属性)元素的额外描述
175
+ * @supported qq
176
+ */
177
+ ariaLabel?: string
178
+
179
+ /** 添加好友时,对方的 openid
180
+ * @supported qq
181
+ */
182
+ openId?: string
183
+
184
+ /** 发送对象的 FriendInfo
185
+ * @supported qq
186
+ */
187
+ shareMessageFriendInfo?: string
188
+
189
+ /** 转发标题,不传则默认使用当前小程序的昵称。 FriendInfo
190
+ * @supported qq
191
+ */
192
+ shareMessageTitle?: string
193
+
194
+ /** 转发显示图片的链接,可以是网络图片路径(仅 QQ CDN 域名路径)或本地图片文件路径或相对代码包根目录的图片文件路径。显示图片长宽比是 5:4FriendInfo
195
+ * @supported qq
196
+ */
197
+ shareMessageImg?: string
198
+
135
199
  /** 用户点击该按钮时,会返回获取到的用户信息,回调的detail数据与 Taro.getUserInfo 返回的一致
136
200
  *
137
201
  * 生效时机: `open-type="getUserInfo"`
138
- * @supported weapp, swan, qq, jd
202
+ * @supported weapp, alipay, swan, qq, jd
139
203
  */
140
204
  onGetUserInfo?: CommonEventFunction<ButtonProps.onGetUserInfoEventDetail>
141
205
 
@@ -156,7 +220,7 @@ interface ButtonProps extends StandardProps {
156
220
  /** 获取用户手机号回调
157
221
  *
158
222
  * 生效时机:`open-type="getphonenumber"`
159
- * @supported weapp, swan, tt, jd
223
+ * @supported weapp, alipay, swan, tt, jd
160
224
  */
161
225
  onGetPhoneNumber?: CommonEventFunction<ButtonProps.onGetPhoneNumberEventDetail>
162
226
 
@@ -194,34 +258,16 @@ interface ButtonProps extends StandardProps {
194
258
  */
195
259
  onTap?: CommonEventFunction
196
260
 
197
- /** 生活号 id,必须是当前小程序同主体且已关联的生活号,open-type="lifestyle" 时有效。
198
- * @supported alipay, qq
199
- */
200
- publicId?: string
201
-
202
261
  /** 当 open-type 为 lifestyle 时有效。
203
262
  * 当点击按钮时触发。
204
263
  * event.detail = { followStatus },followStatus 合法值有 1、2、3,其中 1 表示已关注。2 表示用户不允许关注。3 表示发生未知错误;
205
264
  * 已知问题:基础库 1.0,当用户在点击按钮前已关注生活号,event.detail.followStatus 的值为 true。
206
- * 版本要求:基础库 1.11.0 及以上
207
265
  * @supported alipay
208
266
  */
209
267
  onFollowLifestyle?: CommonEventFunction<{
210
268
  followStatus: 1 | 2 | 3 | true
211
269
  }>
212
270
 
213
- /** 发送订阅类模板消息所用的模板库标题 ID ,可通过 getTemplateLibraryList 获取
214
- * 当参数类型为 Array 时,可传递 1~3 个模板库标题 ID
215
- * @supported swan
216
- */
217
- templateId?: string | Array<string>
218
-
219
- /** 发送订阅类模板消息时所使用的唯一标识符,内容由开发者自定义,用来标识订阅场景
220
- * 注意:同一用户在同一 subscribe-id 下的多次授权不累积下发权限,只能下发一条。若要订阅多条,需要不同 subscribe-id
221
- * @supported swan
222
- */
223
- subscribeId?: string
224
-
225
271
  /** 用户点击该按钮时,调起用户编辑收货地址原生界面,并在编辑完成后返回用户选择的地址,从返回参数的 detail 中获取,和 swan.chooseAddress 一样的。和 open-type 搭配使用,使用时机:open-type="chooseAddress"
226
272
  * @supported swan
227
273
  */
@@ -242,53 +288,6 @@ interface ButtonProps extends StandardProps {
242
288
  */
243
289
  onSubscribe?: CommonEventFunction
244
290
 
245
- /** 打开群资料卡时,传递的群号
246
- * @supported qq
247
- */
248
- groupId?: string
249
-
250
- /** 打开频道页面时,传递的频道号
251
- * @supported qq
252
- */
253
- guildId?: string
254
-
255
- /** 分享类型集合,请参考下面share-type有效值说明。share-type后续将不再维护,请更新为share-mode
256
- * @supported qq
257
- * @default 27
258
- */
259
- shareType?: string
260
-
261
- /** 分享类型集合,请参考下面share-mode有效值说明
262
- * @supported qq
263
- * @default ['qq', 'qzone']
264
- */
265
- shareMode?: string
266
-
267
- /** 无障碍访问,(属性)元素的额外描述
268
- * @supported qq
269
- */
270
- ariaLabel?: string
271
-
272
- /** 添加好友时,对方的 openid
273
- * @supported qq
274
- */
275
- openId?: string
276
-
277
- /** 发送对象的 FriendInfo
278
- * @supported qq
279
- */
280
- shareMessageFriendInfo?: string
281
-
282
- /** 转发标题,不传则默认使用当前小程序的昵称。 FriendInfo
283
- * @supported qq
284
- */
285
- shareMessageTitle?: string
286
-
287
- /** 转发显示图片的链接,可以是网络图片路径(仅 QQ CDN 域名路径)或本地图片文件路径或相对代码包根目录的图片文件路径。显示图片长宽比是 5:4FriendInfo
288
- * @supported qq
289
- */
290
- shareMessageImg?: string
291
-
292
291
  /** 添加好友的回调
293
292
  * @supported qq
294
293
  */
@@ -331,10 +330,7 @@ declare namespace ButtonProps {
331
330
  }
332
331
 
333
332
  /** open-type 的合法值 */
334
- type OpenType =
335
- | keyof openTypeKeys['weapp']
336
- | keyof openTypeKeys['alipay']
337
- | keyof openTypeKeys['qq']
333
+ type OpenType = keyof openTypeKeys['weapp'] | keyof openTypeKeys['alipay'] | keyof openTypeKeys['qq']
338
334
 
339
335
  /** open-type 的合法值 */
340
336
  interface openTypeKeys {
package/types/Camera.d.ts CHANGED
@@ -3,7 +3,7 @@ import { StandardProps, CommonEventFunction } from './common'
3
3
  interface CameraProps extends StandardProps {
4
4
  /** 模式,有效值为normal, scanCode
5
5
  * @default "normal"
6
- * @supported weapp, tt, qq, jd, rn
6
+ * @supported weapp, alipay, tt, qq, jd, rn
7
7
  */
8
8
  mode?: keyof CameraProps.Mode
9
9
 
@@ -15,30 +15,36 @@ interface CameraProps extends StandardProps {
15
15
 
16
16
  /** 摄像头朝向
17
17
  * @default "back"
18
- * @supported weapp, swan, tt, qq, jd, rn
18
+ * @supported weapp, alipay, swan, tt, qq, jd, rn
19
19
  */
20
20
  devicePosition?: keyof CameraProps.DevicePosition
21
21
 
22
22
  /** 闪光灯
23
23
  * @default "auto"
24
- * @supported weapp, swan, tt, qq, jd, rn
24
+ * @supported weapp, alipay, swan, tt, qq, jd, rn
25
25
  */
26
26
  flash?: keyof CameraProps.Flash
27
27
 
28
28
  /** 指定期望的相机帧数据尺寸
29
29
  * @default "medium"
30
- * @supported weapp, tt
30
+ * @supported weapp, alipay, tt
31
31
  */
32
32
  frameSize?: keyof CameraProps.FrameSize
33
33
 
34
+ /** 相机拍照,录制的分辨率。
35
+ * @supported alipay
36
+ * @default "720P"
37
+ */
38
+ outputDimension?: '360P' | '540P' | '720P' | '1080P' | 'max'
39
+
34
40
  /** 摄像头在非正常终止时触发,
35
41
  * 如退出后台等情况
36
- * @supported weapp, swan, tt, qq, jd, rn
42
+ * @supported weapp, alipay, swan, tt, qq, jd, rn
37
43
  */
38
44
  onStop?: CommonEventFunction
39
45
 
40
46
  /** 用户不允许使用摄像头时触发
41
- * @supported weapp, swan, tt, qq, jd, rn
47
+ * @supported weapp, alipay, swan, tt, qq, jd, rn
42
48
  */
43
49
  onError?: CommonEventFunction
44
50
 
@@ -47,11 +53,16 @@ interface CameraProps extends StandardProps {
47
53
  */
48
54
  onInitDone?: CommonEventFunction<CameraProps.onInitDoneEventDetail>
49
55
 
56
+ /** 相机初始化成功时触发。
57
+ * @supported alipay
58
+ */
59
+ onReady?: CommonEventFunction<CameraProps.onInitDoneEventDetail>
60
+
50
61
  /** 在成功识别到一维码时触发,
51
62
  * 仅在 mode="scanCode" 时生效
52
- * @supported weapp, tt, qq, rn
63
+ * @supported weapp, alipay, tt, qq, rn
53
64
  */
54
- onScanCode?: CommonEventFunction
65
+ onScanCode?: CommonEventFunction<CameraProps.onScanCodeEventDetail>
55
66
  }
56
67
  declare namespace CameraProps {
57
68
  /** mode 的合法值 */
@@ -114,6 +125,26 @@ declare namespace CameraProps {
114
125
  /** 最大变焦 */
115
126
  maxZoom: number
116
127
  }
128
+ interface onScanCodeEventDetail {
129
+ /** 字符集 */
130
+ charSet: string
131
+
132
+ /** 原始数据
133
+ * @supported weapp
134
+ */
135
+ rawData: string
136
+
137
+ /** 码类型 */
138
+ type: string
139
+
140
+ /** 识别结果 */
141
+ result: string
142
+
143
+ /** 识别结果(完整)
144
+ * @supported alipay
145
+ */
146
+ fullResult: string
147
+ }
117
148
  }
118
149
 
119
150
  /** 系统相机
package/types/Canvas.d.ts CHANGED
@@ -1,10 +1,5 @@
1
1
  import { ComponentType } from 'react'
2
- import {
3
- StandardProps,
4
- CommonEventFunction,
5
- CanvasTouchEventFunction,
6
- CanvasTouchEvent,
7
- } from './common'
2
+ import { StandardProps, CommonEventFunction, CanvasTouchEventFunction, CanvasTouchEvent } from './common'
8
3
  interface CanvasProps extends StandardProps<any, CanvasTouchEvent> {
9
4
  /** 指定 canvas 类型,支持 2d 和 webgl
10
5
  * @supported weapp, alipay, tt
@@ -22,6 +17,27 @@ interface CanvasProps extends StandardProps<any, CanvasTouchEvent> {
22
17
  */
23
18
  disableScroll?: boolean
24
19
 
20
+ /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
21
+ * @supported h5
22
+ */
23
+ nativeProps?: Record<string, unknown>
24
+
25
+ /** 组件唯一标识符。
26
+ * 注意:同一页面中的 id 不可重复。
27
+ * @supported alipay
28
+ */
29
+ id?: string
30
+
31
+ /**
32
+ * @supported alipay
33
+ */
34
+ width?: string
35
+
36
+ /**
37
+ * @supported alipay
38
+ */
39
+ height?: string
40
+
25
41
  /** 手指触摸动作开始
26
42
  * @supported weapp, alipay, swan, tt, qq, jd
27
43
  */
@@ -52,44 +68,12 @@ interface CanvasProps extends StandardProps<any, CanvasTouchEvent> {
52
68
  */
53
69
  onError?: CommonEventFunction<CanvasProps.onErrorEventDetail>
54
70
 
55
- /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
56
- * @supported h5
57
- */
58
- nativeProps?: Record<string, unknown>
59
-
60
- /** 组件唯一标识符。
61
- * 注意:同一页面中的 id 不可重复。
62
- * @supported alipay
63
- */
64
- id?: string
65
-
66
- /** -
67
- * @supported alipay
68
- */
69
- style?: string
70
-
71
- /** -
72
- * @supported alipay
73
- */
74
- class?: string
75
-
76
- /**
77
- * @supported alipay
78
- */
79
- width?: string
80
-
81
- /**
82
- * @supported alipay
83
- */
84
- height?: string
85
-
86
71
  /** 点击。
87
72
  * @supported alipay
88
73
  */
89
74
  onTap?: CommonEventFunction
90
75
 
91
76
  /** canvas 组件初始化成功触发。
92
- * 版本要求:基础库 2.7.0 及以上
93
77
  * @supported alipay
94
78
  */
95
79
  onReady?: CommonEventFunction
@@ -23,13 +23,6 @@ interface CheckboxProps extends StandardProps {
23
23
  */
24
24
  color?: string
25
25
 
26
- /** 选中项发生变化时触发 change 事件,小程序无此 API
27
- * @supported alipay, h5, rn
28
- */
29
- onChange?: CommonEventFunction<{
30
- value: string[]
31
- }>
32
-
33
26
  /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
34
27
  * @supported h5
35
28
  */
@@ -39,6 +32,13 @@ interface CheckboxProps extends StandardProps {
39
32
  * @supported qq
40
33
  */
41
34
  ariaLabel?: string
35
+
36
+ /** 选中项发生变化时触发 change 事件,小程序无此 API
37
+ * @supported alipay, h5, rn
38
+ */
39
+ onChange?: CommonEventFunction<{
40
+ value: string[]
41
+ }>
42
42
  }
43
43
 
44
44
  /** 多选项目
@@ -6,27 +6,11 @@ interface CoverImageProps extends StandardProps {
6
6
  */
7
7
  src: string
8
8
 
9
- /** 图片加载成功时触发
10
- * @supported weapp, swan, qq, h5
11
- */
12
- onLoad?: CommonEventFunction
13
-
14
- /** 图片加载失败时触发
15
- * @supported weapp, swan, qq, h5
16
- */
17
- onError?: CommonEventFunction
18
-
19
9
  /** 格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;
20
10
  * @supported weapp
21
11
  */
22
12
  referrerPolicy?: 'origin' | 'no-referrer'
23
13
 
24
- /** 点击事件回调。
25
- * 版本要求: 基础库 1.9.0 及以上
26
- * @supported alipay
27
- */
28
- onTap?: CommonEventFunction
29
-
30
14
  /** 设置与容器顶部的固定距离,效果相当于在 CSS 中设置 position: fixed 和 top 值,该属性优先级高于 fixed-bottom,CSS 设置的 position、top、bottom 值
31
15
  * @supported swan
32
16
  */
@@ -56,6 +40,21 @@ interface CoverImageProps extends StandardProps {
56
40
  * @supported qq
57
41
  */
58
42
  ariaLabel?: string
43
+
44
+ /** 图片加载成功时触发
45
+ * @supported weapp, swan, qq, h5
46
+ */
47
+ onLoad?: CommonEventFunction
48
+
49
+ /** 图片加载失败时触发
50
+ * @supported weapp, swan, qq, h5
51
+ */
52
+ onError?: CommonEventFunction
53
+
54
+ /** 点击事件回调。
55
+ * @supported alipay
56
+ */
57
+ onTap?: CommonEventFunction
59
58
  }
60
59
 
61
60
  /** 覆盖在原生组件之上的图片视图。可覆盖的原生组件同cover-view,支持嵌套在cover-view里。
@@ -7,12 +7,6 @@ interface CoverViewProps extends ViewProps {
7
7
  */
8
8
  scrollTop?: number
9
9
 
10
- /** 点击事件回调。
11
- * 版本要求:基础库 1.9.0 及以上
12
- * @supported alipay
13
- */
14
- onTap?: CommonEventFunction
15
-
16
10
  /** 设置与容器顶部的固定距离,效果相当于在 CSS 中设置 position: fixed 和 top 值,该属性优先级高于 fixed-bottom,CSS 设置的 position、top、bottom 值
17
11
  * @supported swan
18
12
  */
@@ -42,6 +36,11 @@ interface CoverViewProps extends ViewProps {
42
36
  * @supported qq
43
37
  */
44
38
  ariaLabel?: string
39
+
40
+ /** 点击事件回调。
41
+ * @supported alipay
42
+ */
43
+ onTap?: CommonEventFunction
45
44
  }
46
45
 
47
46
  /** 覆盖在原生组件之上的文本视图。可覆盖的原生组件包括 map、video、canvas、camera、live-player、live-pusher 只支持嵌套 cover-view、cover-image,可在 cover-view 中使用 button。
package/types/Form.d.ts CHANGED
@@ -17,16 +17,6 @@ interface FormProps extends StandardProps {
17
17
  */
18
18
  reportSubmitTimeout?: number
19
19
 
20
- /** 携带 form 中的数据触发 submit 事件
21
- * @supported weapp, alipay, swan, tt, qq, jd, rn
22
- */
23
- onSubmit?: CommonEventFunction<FormProps.onSubmitEventDetail>
24
-
25
- /** 表单重置时会触发 reset 事件
26
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
27
- */
28
- onReset?: CommonEventFunction
29
-
30
20
  /** 模板消息的类型,report-submit 为 true 时填写有效
31
21
  * 取值:default / subscribe
32
22
  * @default 'default'
@@ -45,6 +35,16 @@ interface FormProps extends StandardProps {
45
35
  * @supported swan
46
36
  */
47
37
  subscribeId?: string
38
+
39
+ /** 携带 form 中的数据触发 submit 事件
40
+ * @supported weapp, alipay, swan, tt, qq, jd, rn
41
+ */
42
+ onSubmit?: CommonEventFunction<FormProps.onSubmitEventDetail>
43
+
44
+ /** 表单重置时会触发 reset 事件
45
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
46
+ */
47
+ onReset?: CommonEventFunction
48
48
  }
49
49
  declare namespace FormProps {
50
50
  interface onSubmitEventDetail {
package/types/Image.d.ts CHANGED
@@ -37,16 +37,6 @@ interface ImageProps extends StandardProps {
37
37
  */
38
38
  showMenuByLongpress?: boolean
39
39
 
40
- /** 当错误发生时,发布到 AppService 的事件名,事件对象
41
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
42
- */
43
- onError?: CommonEventFunction<ImageProps.onErrorEventDetail>
44
-
45
- /** 当图片载入完毕时,发布到 AppService 的事件名,事件对象
46
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
47
- */
48
- onLoad?: CommonEventFunction<ImageProps.onLoadEventDetail>
49
-
50
40
  /**
51
41
  * 为 img 标签额外增加的属性
52
42
  * @supported h5
@@ -58,32 +48,11 @@ interface ImageProps extends StandardProps {
58
48
  */
59
49
  nativeProps?: Record<string, unknown>
60
50
 
61
- /** 外部样式。
62
- * @supported alipay
63
- */
64
- class?: string
65
-
66
- /** 内联样式。
67
- * @supported alipay
68
- */
69
- style?: string
70
-
71
51
  /** 默认图片地址,若设置默认图片地址,会先显示默认图片,等 src 对应的图片加载成功后,再渲染对应的图片。
72
- * 版本要求: 基础库 1.19.0 及以上
73
52
  * @supported alipay
74
53
  */
75
54
  defaultSource?: string
76
55
 
77
- /** 点击图片时触发。
78
- * @supported alipay
79
- */
80
- onTap?: CommonEventFunction
81
-
82
- /** 点击图片时触发,阻止事件冒泡。
83
- * @supported alipay
84
- */
85
- catchTap?: CommonEventFunction
86
-
87
56
  /** 阻止长按图片时弹起默认菜单(即将该属性设置为image-menu-prevent="true"或image-menu-prevent),只在初始化时有效,不能动态变更;若不想阻止弹起默认菜单,则不需要设置此属性。注:长按菜单后的操作暂不支持 svg 格式
88
57
  * @supported swan
89
58
  */
@@ -103,6 +72,26 @@ interface ImageProps extends StandardProps {
103
72
  * @supported qq
104
73
  */
105
74
  ariaLabel?: string
75
+
76
+ /** 当错误发生时,发布到 AppService 的事件名,事件对象
77
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
78
+ */
79
+ onError?: CommonEventFunction<ImageProps.onErrorEventDetail>
80
+
81
+ /** 当图片载入完毕时,发布到 AppService 的事件名,事件对象
82
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
83
+ */
84
+ onLoad?: CommonEventFunction<ImageProps.onLoadEventDetail>
85
+
86
+ /** 点击图片时触发。
87
+ * @supported alipay
88
+ */
89
+ onTap?: CommonEventFunction
90
+
91
+ /** 点击图片时触发,阻止事件冒泡。
92
+ * @supported alipay
93
+ */
94
+ catchTap?: CommonEventFunction
106
95
  }
107
96
  declare namespace ImageProps {
108
97
  /** mode 的合法值 */
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
 
@@ -165,6 +165,26 @@ interface InputProps extends StandardProps, FormItemProps {
165
165
  */
166
166
  controlled?: boolean
167
167
 
168
+ /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
169
+ * @supported h5
170
+ */
171
+ nativeProps?: Record<string, unknown>
172
+
173
+ /** 组件名字,用于表单提交获取数据。
174
+ * @supported alipay
175
+ */
176
+ name?: string
177
+
178
+ /** 是否强制使用系统键盘和 Web-view 创建的 input 元素。为 true 时,confirm-type、confirm-hold 可能失效。
179
+ * @supported alipay
180
+ */
181
+ alwaysSystem?: string
182
+
183
+ /** 无障碍访问,(属性)元素的额外描述
184
+ * @supported qq
185
+ */
186
+ ariaLabel?: string
187
+
168
188
  /** 当键盘输入时,触发input事件,event.detail = {value, cursor, keyCode},处理函数可以直接 return 一个字符串,将替换输入框的内容。
169
189
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
170
190
  */
@@ -190,27 +210,6 @@ interface InputProps extends StandardProps, FormItemProps {
190
210
  * @supported weapp, qq
191
211
  */
192
212
  onKeyboardHeightChange?: CommonEventFunction<InputProps.onKeyboardHeightChangeEventDetail>
193
-
194
- /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
195
- * @supported h5
196
- */
197
- nativeProps?: Record<string, unknown>
198
-
199
- /** 组件名字,用于表单提交获取数据。
200
- * @supported alipay
201
- */
202
- name?: string
203
-
204
- /** 是否强制使用系统键盘和 Web-view 创建的 input 元素。为 true 时,confirm-type、confirm-hold 可能失效。
205
- * 版本要求:基础库 2.7.3 及以上
206
- * @supported alipay
207
- */
208
- alwaysSystem?: string
209
-
210
- /** 无障碍访问,(属性)元素的额外描述
211
- * @supported qq
212
- */
213
- ariaLabel?: string
214
213
  }
215
214
  declare namespace InputProps {
216
215
  /** > 注意:React-Native 端 `inputEventDetail` 仅实现参数 `value`,若需实时获取光标位置则可通过 [`onSelectionChange`](https://reactnative.dev/docs/textinput#onselectionchange) 实现。 */