@tarojs/components 3.5.7 → 3.5.9
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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-button-core.cjs.entry.js +5 -0
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-movable-area-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-movable-view-core.cjs.entry.js +18 -43
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +5 -0
- package/dist/cjs/taro-video-control_3.cjs.entry.js +98 -181
- package/dist/collection/components/button/button.js +11 -0
- package/dist/collection/components/movable-area/area.css +2 -2
- package/dist/collection/components/movable-area/movable-view.js +18 -33
- package/dist/collection/components/swiper/swiper.js +23 -0
- package/dist/collection/components/video/video-control.js +22 -39
- package/dist/collection/components/video/video-danmu.js +39 -52
- package/dist/collection/components/video/video.js +37 -60
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-button-core.entry.js +5 -0
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-movable-area-core.entry.js +1 -1
- package/dist/esm/taro-movable-view-core.entry.js +18 -43
- package/dist/esm/taro-swiper-core_2.entry.js +5 -0
- package/dist/esm/taro-video-control_3.entry.js +98 -181
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
- package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +55 -55
- package/dist/taro-components/p-0380841f.system.js +1 -1
- package/dist/taro-components/{p-a94524c9.system.entry.js → p-06b9d39c.system.entry.js} +1 -1
- package/dist/taro-components/{p-63a0c6b0.entry.js → p-34178401.entry.js} +1 -1
- package/dist/taro-components/p-3549b6d2.entry.js +1 -0
- package/dist/taro-components/p-4262d1b6.entry.js +1 -0
- package/dist/taro-components/{p-f8b9c4b0.entry.js → p-42630f45.entry.js} +1 -1
- package/dist/taro-components/{p-f81a74bb.system.entry.js → p-4c1a7cae.system.entry.js} +81 -81
- package/dist/taro-components/{p-3744e978.entry.js → p-99d17a1a.entry.js} +52 -52
- package/dist/taro-components/{p-13f0b11f.system.entry.js → p-a5496bf5.system.entry.js} +1 -1
- package/dist/taro-components/p-f40e1218.system.entry.js +1 -0
- package/dist/taro-components/{p-1c775a11.system.entry.js → p-f5f1c3b7.system.entry.js} +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/button/button.d.ts +1 -0
- package/dist/types/components/swiper/swiper.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +15 -12
- package/types/Ad.d.ts +21 -22
- package/types/AnimationVideo.d.ts +62 -0
- package/types/AnimationView.d.ts +45 -0
- package/types/ArCamera.d.ts +50 -0
- package/types/Audio.d.ts +6 -6
- package/types/AwemeData.d.ts +43 -0
- package/types/Button.d.ts +68 -71
- package/types/Camera.d.ts +16 -17
- package/types/Canvas.d.ts +23 -28
- package/types/Checkbox.d.ts +8 -8
- package/types/CheckboxGroup.d.ts +1 -1
- package/types/CommentDetail.d.ts +72 -0
- package/types/CommentList.d.ts +128 -0
- package/types/ContactButton.d.ts +53 -0
- package/types/CoverImage.d.ts +16 -16
- package/types/CoverView.d.ts +105 -7
- package/types/CustomWrapper.d.ts +1 -1
- package/types/FollowSwan.d.ts +28 -0
- package/types/Form.d.ts +11 -11
- package/types/Icon.d.ts +1 -1
- package/types/Image.d.ts +21 -21
- package/types/InlinePaymentPanel.d.ts +58 -0
- package/types/Input.d.ts +93 -28
- package/types/Lifestyle.d.ts +26 -0
- package/types/Like.d.ts +107 -0
- package/types/LivePlayer.d.ts +32 -26
- package/types/LivePusher.d.ts +6 -6
- package/types/Login.d.ts +45 -0
- package/types/Lottie.d.ts +113 -0
- package/types/Map.d.ts +67 -72
- package/types/MatchMedia.d.ts +1 -1
- package/types/MovableArea.d.ts +2 -2
- package/types/MovableView.d.ts +20 -29
- package/types/NativeSlot.d.ts +32 -0
- package/types/Navigator.d.ts +11 -11
- package/types/OpenData.d.ts +6 -6
- package/types/PageContainer.d.ts +31 -24
- package/types/PageMeta.d.ts +15 -15
- package/types/Picker.d.ts +2 -6
- package/types/PickerView.d.ts +12 -22
- package/types/Progress.d.ts +6 -6
- package/types/Radio.d.ts +1 -1
- package/types/RadioGroup.d.ts +6 -6
- package/types/RichText.d.ts +17 -17
- package/types/RootPortal.d.ts +11 -2
- package/types/RtcRoom.d.ts +104 -0
- package/types/RtcRoomItem.d.ts +26 -0
- package/types/ScrollView.d.ts +47 -31
- package/types/ShareElement.d.ts +20 -10
- package/types/Slider.d.ts +11 -11
- package/types/Slot.d.ts +1 -1
- package/types/Swiper.d.ts +32 -20
- package/types/SwiperItem.d.ts +3 -2
- package/types/Switch.d.ts +6 -6
- package/types/TabItem.d.ts +35 -0
- package/types/Tabs.d.ts +58 -0
- package/types/Text.d.ts +1 -1
- package/types/Textarea.d.ts +39 -33
- package/types/Video.d.ts +123 -108
- package/types/View.d.ts +21 -14
- package/types/VoipRoom.d.ts +5 -5
- package/types/WebView.d.ts +12 -6
- package/types/index.vue3.d.ts +268 -259
- package/dist/taro-components/p-6800ac6f.entry.js +0 -1
- package/dist/taro-components/p-7f93fa08.entry.js +0 -1
- package/dist/taro-components/p-9e1572c5.system.entry.js +0 -1
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,11 +258,6 @@ 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 表示发生未知错误;
|
|
@@ -209,18 +268,6 @@ interface ButtonProps extends StandardProps {
|
|
|
209
268
|
followStatus: 1 | 2 | 3 | true
|
|
210
269
|
}>
|
|
211
270
|
|
|
212
|
-
/** 发送订阅类模板消息所用的模板库标题 ID ,可通过 getTemplateLibraryList 获取
|
|
213
|
-
* 当参数类型为 Array 时,可传递 1~3 个模板库标题 ID
|
|
214
|
-
* @supported swan
|
|
215
|
-
*/
|
|
216
|
-
templateId?: string | Array<string>
|
|
217
|
-
|
|
218
|
-
/** 发送订阅类模板消息时所使用的唯一标识符,内容由开发者自定义,用来标识订阅场景
|
|
219
|
-
* 注意:同一用户在同一 subscribe-id 下的多次授权不累积下发权限,只能下发一条。若要订阅多条,需要不同 subscribe-id
|
|
220
|
-
* @supported swan
|
|
221
|
-
*/
|
|
222
|
-
subscribeId?: string
|
|
223
|
-
|
|
224
271
|
/** 用户点击该按钮时,调起用户编辑收货地址原生界面,并在编辑完成后返回用户选择的地址,从返回参数的 detail 中获取,和 swan.chooseAddress 一样的。和 open-type 搭配使用,使用时机:open-type="chooseAddress"
|
|
225
272
|
* @supported swan
|
|
226
273
|
*/
|
|
@@ -241,53 +288,6 @@ interface ButtonProps extends StandardProps {
|
|
|
241
288
|
*/
|
|
242
289
|
onSubscribe?: CommonEventFunction
|
|
243
290
|
|
|
244
|
-
/** 打开群资料卡时,传递的群号
|
|
245
|
-
* @supported qq
|
|
246
|
-
*/
|
|
247
|
-
groupId?: string
|
|
248
|
-
|
|
249
|
-
/** 打开频道页面时,传递的频道号
|
|
250
|
-
* @supported qq
|
|
251
|
-
*/
|
|
252
|
-
guildId?: string
|
|
253
|
-
|
|
254
|
-
/** 分享类型集合,请参考下面share-type有效值说明。share-type后续将不再维护,请更新为share-mode
|
|
255
|
-
* @supported qq
|
|
256
|
-
* @default 27
|
|
257
|
-
*/
|
|
258
|
-
shareType?: string
|
|
259
|
-
|
|
260
|
-
/** 分享类型集合,请参考下面share-mode有效值说明
|
|
261
|
-
* @supported qq
|
|
262
|
-
* @default ['qq', 'qzone']
|
|
263
|
-
*/
|
|
264
|
-
shareMode?: string
|
|
265
|
-
|
|
266
|
-
/** 无障碍访问,(属性)元素的额外描述
|
|
267
|
-
* @supported qq
|
|
268
|
-
*/
|
|
269
|
-
ariaLabel?: string
|
|
270
|
-
|
|
271
|
-
/** 添加好友时,对方的 openid
|
|
272
|
-
* @supported qq
|
|
273
|
-
*/
|
|
274
|
-
openId?: string
|
|
275
|
-
|
|
276
|
-
/** 发送对象的 FriendInfo
|
|
277
|
-
* @supported qq
|
|
278
|
-
*/
|
|
279
|
-
shareMessageFriendInfo?: string
|
|
280
|
-
|
|
281
|
-
/** 转发标题,不传则默认使用当前小程序的昵称。 FriendInfo
|
|
282
|
-
* @supported qq
|
|
283
|
-
*/
|
|
284
|
-
shareMessageTitle?: string
|
|
285
|
-
|
|
286
|
-
/** 转发显示图片的链接,可以是网络图片路径(仅 QQ CDN 域名路径)或本地图片文件路径或相对代码包根目录的图片文件路径。显示图片长宽比是 5:4FriendInfo
|
|
287
|
-
* @supported qq
|
|
288
|
-
*/
|
|
289
|
-
shareMessageImg?: string
|
|
290
|
-
|
|
291
291
|
/** 添加好友的回调
|
|
292
292
|
* @supported qq
|
|
293
293
|
*/
|
|
@@ -330,10 +330,7 @@ declare namespace ButtonProps {
|
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
/** open-type 的合法值 */
|
|
333
|
-
type OpenType =
|
|
334
|
-
| keyof openTypeKeys['weapp']
|
|
335
|
-
| keyof openTypeKeys['alipay']
|
|
336
|
-
| keyof openTypeKeys['qq']
|
|
333
|
+
type OpenType = keyof openTypeKeys['weapp'] | keyof openTypeKeys['alipay'] | keyof openTypeKeys['qq']
|
|
337
334
|
|
|
338
335
|
/** open-type 的合法值 */
|
|
339
336
|
interface openTypeKeys {
|
|
@@ -529,7 +526,7 @@ declare namespace ButtonProps {
|
|
|
529
526
|
|
|
530
527
|
/** 按钮
|
|
531
528
|
* @classification forms
|
|
532
|
-
* @supported weapp,
|
|
529
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
533
530
|
* @example_react
|
|
534
531
|
* ```tsx
|
|
535
532
|
* export default class PageButton extends Component {
|
package/types/Camera.d.ts
CHANGED
|
@@ -3,48 +3,48 @@ 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
|
|
|
10
10
|
/** 分辨率,不支持动态修改
|
|
11
11
|
* @default "medium"
|
|
12
|
-
* @supported weapp, tt
|
|
12
|
+
* @supported weapp, tt
|
|
13
13
|
*/
|
|
14
14
|
resolution?: keyof CameraProps.Resolution
|
|
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
|
-
/** 相机拍照,录制的分辨率。有效值为 360P、540P、720P、1080P、max
|
|
29
|
-
* @default "720P"
|
|
30
|
-
* @supported alipay
|
|
31
|
-
*/
|
|
32
|
-
outputDimension?: '360P'|'540P'|'720P'|'1080P'|'max'
|
|
33
|
-
|
|
34
28
|
/** 指定期望的相机帧数据尺寸
|
|
35
29
|
* @default "medium"
|
|
36
|
-
* @supported weapp,
|
|
30
|
+
* @supported weapp, alipay, tt
|
|
37
31
|
*/
|
|
38
32
|
frameSize?: keyof CameraProps.FrameSize
|
|
39
33
|
|
|
34
|
+
/** 相机拍照,录制的分辨率。
|
|
35
|
+
* @supported alipay
|
|
36
|
+
* @default "720P"
|
|
37
|
+
*/
|
|
38
|
+
outputDimension?: '360P' | '540P' | '720P' | '1080P' | 'max'
|
|
39
|
+
|
|
40
40
|
/** 摄像头在非正常终止时触发,
|
|
41
41
|
* 如退出后台等情况
|
|
42
|
-
* @supported weapp, swan, tt, qq, jd, rn
|
|
42
|
+
* @supported weapp, alipay, swan, tt, qq, jd, rn
|
|
43
43
|
*/
|
|
44
44
|
onStop?: CommonEventFunction
|
|
45
45
|
|
|
46
46
|
/** 用户不允许使用摄像头时触发
|
|
47
|
-
* @supported weapp, swan, tt, qq, jd, rn
|
|
47
|
+
* @supported weapp, alipay, swan, tt, qq, jd, rn
|
|
48
48
|
*/
|
|
49
49
|
onError?: CommonEventFunction
|
|
50
50
|
|
|
@@ -53,14 +53,14 @@ interface CameraProps extends StandardProps {
|
|
|
53
53
|
*/
|
|
54
54
|
onInitDone?: CommonEventFunction<CameraProps.onInitDoneEventDetail>
|
|
55
55
|
|
|
56
|
-
/**
|
|
56
|
+
/** 相机初始化成功时触发。
|
|
57
57
|
* @supported alipay
|
|
58
58
|
*/
|
|
59
59
|
onReady?: CommonEventFunction<CameraProps.onInitDoneEventDetail>
|
|
60
60
|
|
|
61
61
|
/** 在成功识别到一维码时触发,
|
|
62
62
|
* 仅在 mode="scanCode" 时生效
|
|
63
|
-
* @supported weapp, tt, qq, rn
|
|
63
|
+
* @supported weapp, alipay, tt, qq, rn
|
|
64
64
|
*/
|
|
65
65
|
onScanCode?: CommonEventFunction<CameraProps.onScanCodeEventDetail>
|
|
66
66
|
}
|
|
@@ -125,7 +125,6 @@ declare namespace CameraProps {
|
|
|
125
125
|
/** 最大变焦 */
|
|
126
126
|
maxZoom: number
|
|
127
127
|
}
|
|
128
|
-
|
|
129
128
|
interface onScanCodeEventDetail {
|
|
130
129
|
/** 字符集 */
|
|
131
130
|
charSet: string
|
|
@@ -150,7 +149,7 @@ declare namespace CameraProps {
|
|
|
150
149
|
|
|
151
150
|
/** 系统相机
|
|
152
151
|
* @classification media
|
|
153
|
-
* @supported weapp,
|
|
152
|
+
* @supported weapp, alipay, swan, tt, qq, jd, rn
|
|
154
153
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/camera.html
|
|
155
154
|
*/
|
|
156
155
|
declare const Camera: ComponentType<CameraProps>
|
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,27 +68,6 @@ 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
|
-
width?: string
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* @supported alipay
|
|
73
|
-
*/
|
|
74
|
-
height?: string
|
|
75
|
-
|
|
76
71
|
/** 点击。
|
|
77
72
|
* @supported alipay
|
|
78
73
|
*/
|
|
@@ -93,7 +88,7 @@ declare namespace CanvasProps {
|
|
|
93
88
|
*
|
|
94
89
|
* `<Canvas />` 组件的 RN 版本尚未实现。
|
|
95
90
|
* @classification canvas
|
|
96
|
-
* @supported weapp, tt
|
|
91
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5
|
|
97
92
|
* @example_react
|
|
98
93
|
* ```tsx
|
|
99
94
|
* class App extends Components {
|
package/types/Checkbox.d.ts
CHANGED
|
@@ -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,11 +32,18 @@ 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
|
/** 多选项目
|
|
45
45
|
* @classification forms
|
|
46
|
-
* @supported weapp, h5, rn
|
|
46
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
47
47
|
* @example_react
|
|
48
48
|
* ```tsx
|
|
49
49
|
* export default class PageCheckbox extends Component {
|
package/types/CheckboxGroup.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ interface CheckboxGroupProps extends StandardProps, FormItemProps {
|
|
|
16
16
|
|
|
17
17
|
/** 多项选择器,内部由多个checkbox组成
|
|
18
18
|
* @classification forms
|
|
19
|
-
* @supported weapp,
|
|
19
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
20
20
|
* @example
|
|
21
21
|
* ```tsx
|
|
22
22
|
* export default class PageCheckbox extends Component {
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
import { StandardProps } from './common'
|
|
3
|
+
interface CommentDetailProps extends StandardProps {
|
|
4
|
+
/** 评论核心参数
|
|
5
|
+
* @supported swan
|
|
6
|
+
*/
|
|
7
|
+
commentParam: CommentDetailProps.ICommentParam
|
|
8
|
+
|
|
9
|
+
/** 评论 ID
|
|
10
|
+
* @supported swan
|
|
11
|
+
*/
|
|
12
|
+
srid: string
|
|
13
|
+
|
|
14
|
+
/** 滚动方式为页面滚动,若组件作为浮层使用,该参数需设为 false
|
|
15
|
+
* @supported swan
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
isPageScroll?: boolean
|
|
19
|
+
|
|
20
|
+
/** 是否需要底部 toolbar,若使用开发者自定义的底部 toolbar,该参数需设为 false
|
|
21
|
+
* @supported swan
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
needToolbar?: boolean
|
|
25
|
+
|
|
26
|
+
/** 是否需要详情顶部父级评论的点赞按钮,默认显示
|
|
27
|
+
* @supported swan
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
needLikeBtn?: boolean
|
|
31
|
+
|
|
32
|
+
/** 删除详情后是否返回列表项,默认一站式逻辑。若使用浮层,请设置改属性为 false
|
|
33
|
+
* @supported swan
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
backListAfterDelete?: boolean
|
|
37
|
+
|
|
38
|
+
/** 用于调起评论发布器发布评论
|
|
39
|
+
* @supported swan
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
addComment?: boolean
|
|
43
|
+
|
|
44
|
+
/** 删除整体详情内容时触发,返回数据为{status, data:{srid}}
|
|
45
|
+
* @supported swan
|
|
46
|
+
*/
|
|
47
|
+
onDelete?: CommonEventFunction
|
|
48
|
+
}
|
|
49
|
+
namespace CommentDetailProps {
|
|
50
|
+
interface ICommentParam {
|
|
51
|
+
/** 被点赞的文章的 id,与 path 参数一一对应
|
|
52
|
+
* @example "20200101"
|
|
53
|
+
*/
|
|
54
|
+
snid: string
|
|
55
|
+
|
|
56
|
+
/** 文章标题 */
|
|
57
|
+
title: string
|
|
58
|
+
|
|
59
|
+
/** 智能小程序内页链接,最长不能超过 194 字符
|
|
60
|
+
* @example "/pages/index/index"
|
|
61
|
+
*/
|
|
62
|
+
path: string
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** 评论详情
|
|
67
|
+
* @classification open
|
|
68
|
+
* @supported swan
|
|
69
|
+
* @see https://smartprogram.baidu.com/docs/develop/extended/component-content/comment-detail/
|
|
70
|
+
*/
|
|
71
|
+
declare const CommentDetail: ComponentType<CommentDetailProps>
|
|
72
|
+
export { CommentDetail, CommentDetailProps }
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
import { StandardProps } from './common'
|
|
3
|
+
interface CommentListProps extends StandardProps {
|
|
4
|
+
/** 评论核心参数
|
|
5
|
+
* @supported swan
|
|
6
|
+
*/
|
|
7
|
+
commentParam: CommentListProps.ICommentParam
|
|
8
|
+
|
|
9
|
+
/** 底部 toolbar 的相关配置
|
|
10
|
+
* @supported swan
|
|
11
|
+
*/
|
|
12
|
+
toolbarConfig?: CommentListProps.IToolbarConfig
|
|
13
|
+
|
|
14
|
+
/** 滚动方式为页面滚动,若组件作为浮层使用,该参数需设为 false
|
|
15
|
+
* @supported swan
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
isPageScroll?: boolean
|
|
19
|
+
|
|
20
|
+
/** 是否需要底部 toolbar ,若使用开发者自定义的底部 toolbar ,该参数需设为 false
|
|
21
|
+
* @supported swan
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
needToolbar?: boolean
|
|
25
|
+
|
|
26
|
+
/** 用于调起评论发布器发布评论,发布成功插入列表第一条,且滚动到列表顶部
|
|
27
|
+
* @supported swan
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
addComment?: boolean
|
|
31
|
+
|
|
32
|
+
/** 点击单条评论跳转的详情页页面 path ,若没有配置则不会发生跳转;配置的前提是列表与详情均是页面级
|
|
33
|
+
* @supported swan
|
|
34
|
+
*/
|
|
35
|
+
detailPath?: string
|
|
36
|
+
|
|
37
|
+
/** 是否折叠列表,默认全展示
|
|
38
|
+
* @supported swan
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
isFolded?: boolean
|
|
42
|
+
|
|
43
|
+
/** 折叠后列表展示最大条数,默认 3 条,最多 10 条
|
|
44
|
+
* @supported swan
|
|
45
|
+
* @default 3
|
|
46
|
+
*/
|
|
47
|
+
foldNum?: number
|
|
48
|
+
|
|
49
|
+
/** 传入放置评论组件的页面路径,如'/pages/list/index',组件内部会触发跳转逻辑
|
|
50
|
+
* @supported swan
|
|
51
|
+
*/
|
|
52
|
+
viewMorePath?: string
|
|
53
|
+
|
|
54
|
+
/** 『全部 xx 条』的样式,目前只支持开发者自定义字体颜色
|
|
55
|
+
* @supported swan
|
|
56
|
+
*/
|
|
57
|
+
viewMoreStyle?: CommentListProps.IViewMoreStyle
|
|
58
|
+
|
|
59
|
+
/** 绑定点击单条评论的事件,点击单条评论时触发,返回数据为{status, data:{srid}}
|
|
60
|
+
* @supported swan
|
|
61
|
+
*/
|
|
62
|
+
onClickComment?: CommonEventFunction
|
|
63
|
+
|
|
64
|
+
/** 绑定点击更多事件,若除了页面跳转还需要其他操作,可通过该回调执行;若为浮层,也可使用该回调自定义交互逻辑
|
|
65
|
+
* @supported swan
|
|
66
|
+
*/
|
|
67
|
+
onViewMore?: CommonEventFunction
|
|
68
|
+
}
|
|
69
|
+
namespace CommentListProps {
|
|
70
|
+
interface ICommentParam {
|
|
71
|
+
/** 被点赞的文章的 id,与 path 参数一一对应
|
|
72
|
+
* @example "20200101"
|
|
73
|
+
*/
|
|
74
|
+
snid: string
|
|
75
|
+
|
|
76
|
+
/** 文章标题 */
|
|
77
|
+
title: string
|
|
78
|
+
|
|
79
|
+
/** 智能小程序内页链接,最长不能超过 194 字符
|
|
80
|
+
* @example "/pages/index/index"
|
|
81
|
+
*/
|
|
82
|
+
path: string
|
|
83
|
+
|
|
84
|
+
/** 数组第一项用于收藏功能的展示图片
|
|
85
|
+
* @default ['https://b.bdstatic.com/miniapp/images/demo-dog.png']
|
|
86
|
+
*/
|
|
87
|
+
images?: string[]
|
|
88
|
+
}
|
|
89
|
+
interface IToolbarConfig {
|
|
90
|
+
/** 输入框提示文字 */
|
|
91
|
+
placeholder?: string
|
|
92
|
+
|
|
93
|
+
/** 显示的互动模块,对应默认值分别是:评论数、点赞、收藏、分享
|
|
94
|
+
* @default ['comment', 'like', 'favor', 'share']
|
|
95
|
+
*/
|
|
96
|
+
moduleList?: string
|
|
97
|
+
|
|
98
|
+
/** 若 moduleList 里配置了 share 模块,该参数为必填 */
|
|
99
|
+
share?: IShare
|
|
100
|
+
}
|
|
101
|
+
interface IShare {
|
|
102
|
+
/** 分享标题 */
|
|
103
|
+
title: string
|
|
104
|
+
|
|
105
|
+
/** 分享内容 */
|
|
106
|
+
content?: string
|
|
107
|
+
|
|
108
|
+
/** 分享图标 */
|
|
109
|
+
imageUrl?: string
|
|
110
|
+
|
|
111
|
+
/** 页面 path ,必须是以 / 开头的完整路径,如果 path 中参数包含中文字符,需对中文字符进行编码 */
|
|
112
|
+
path?: string
|
|
113
|
+
}
|
|
114
|
+
interface IViewMoreStyle {
|
|
115
|
+
/** 『全部 xx 条』的字体颜色,默认为视觉提供色号,开发者可传入自定义色号
|
|
116
|
+
* @default "#3388ff"
|
|
117
|
+
*/
|
|
118
|
+
color?: string
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** 评论列表
|
|
123
|
+
* @classification open
|
|
124
|
+
* @supported swan
|
|
125
|
+
* @see https://smartprogram.baidu.com/docs/develop/extended/component-content/comment-list/
|
|
126
|
+
*/
|
|
127
|
+
declare const CommentList: ComponentType<CommentListProps>
|
|
128
|
+
export { CommentList, CommentListProps }
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
import { StandardProps } from './common'
|
|
3
|
+
interface ContactButtonProps extends StandardProps {
|
|
4
|
+
/** 必填。企业唯一编码,一个企业支付宝账号对应一个编码。
|
|
5
|
+
* @supported alipay
|
|
6
|
+
*/
|
|
7
|
+
tntInstId: string
|
|
8
|
+
|
|
9
|
+
/** 必填。聊天窗编码,每个聊天窗的唯一编码。
|
|
10
|
+
* @supported alipay
|
|
11
|
+
*/
|
|
12
|
+
scene: string
|
|
13
|
+
|
|
14
|
+
/** 选填。咨询按钮大小,正方形设置边长(如25*25 px)。
|
|
15
|
+
* @supported alipay
|
|
16
|
+
* @default 25
|
|
17
|
+
*/
|
|
18
|
+
size?: number | string
|
|
19
|
+
|
|
20
|
+
/** 选填。咨询按钮颜色,默认白底蓝色。
|
|
21
|
+
* @supported alipay
|
|
22
|
+
* @default "#00A3FF"
|
|
23
|
+
*/
|
|
24
|
+
color?: string
|
|
25
|
+
|
|
26
|
+
/** 选填。咨询按钮头像。
|
|
27
|
+
* @supported alipay
|
|
28
|
+
*/
|
|
29
|
+
icon?: string
|
|
30
|
+
|
|
31
|
+
/** 选填。支付宝访客用户ID(2088开头)。
|
|
32
|
+
* 说明: 客服回答问题时,如客户已离开咨询窗口,则通过推送消息到支付宝 card 中提醒客户。
|
|
33
|
+
* @supported alipay
|
|
34
|
+
*/
|
|
35
|
+
alipayCardNo?: string
|
|
36
|
+
|
|
37
|
+
/** 选填。该属性主要用于传递一些扩展信息给组件,以实现一些高级功能。该属性值的生成方式为:encodeURIComponent({"字段名":"字段值"}), 其中,字段名和字段值要根据实际使用的功能进行替换。
|
|
38
|
+
* 目前通过传入扩展信息可支持的 3 个功能:
|
|
39
|
+
* 1.访客名片。需传 cinfo 和 key 两个扩展字段,代码形如在云客服中进入 设置 > 服务窗配置 > 聊天窗 URL。点击操作栏中的 聊天窗 URL ,获取 tntInstId(企业编码)和 scene(聊天窗编码)。encodeURIComponent({"cinfo":"生成的 cinfo","key":"生成的key"}),cinfo 和 key 的值说明 支付宝小程序接入访客名片;
|
|
40
|
+
* 2.聊天窗默认带出用户的小程序订单数据。需传 appId 字段,代码形如encodeURIComponent({"appId":"商户小程序appid"})
|
|
41
|
+
* 3.未读客服消息同步至"我的小程序-我的"。同样需传 appId 字段,代码形如 encodeURIComponent({"appId":"商户小程序appid"})。
|
|
42
|
+
* @supported alipay
|
|
43
|
+
*/
|
|
44
|
+
extInfo?: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** 智能客服
|
|
48
|
+
* @classification open
|
|
49
|
+
* @supported alipay
|
|
50
|
+
* @see https://opendocs.alipay.com/mini/component/contact-button
|
|
51
|
+
*/
|
|
52
|
+
declare const ContactButton: ComponentType<ContactButtonProps>
|
|
53
|
+
export { ContactButton, ContactButtonProps }
|