@tarojs/components 3.5.7 → 3.5.8
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 +20 -21
- 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 +5 -5
- package/types/AwemeData.d.ts +43 -0
- package/types/Button.d.ts +67 -70
- package/types/Camera.d.ts +15 -16
- package/types/Canvas.d.ts +22 -27
- package/types/Checkbox.d.ts +7 -7
- 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 +15 -15
- package/types/CoverView.d.ts +5 -5
- package/types/FollowSwan.d.ts +28 -0
- package/types/Form.d.ts +10 -10
- package/types/Image.d.ts +20 -20
- package/types/InlinePaymentPanel.d.ts +58 -0
- package/types/Input.d.ts +23 -21
- package/types/Lifestyle.d.ts +26 -0
- package/types/Like.d.ts +107 -0
- package/types/LivePlayer.d.ts +31 -25
- package/types/LivePusher.d.ts +5 -5
- package/types/Login.d.ts +45 -0
- package/types/Lottie.d.ts +113 -0
- package/types/Map.d.ts +66 -71
- package/types/MovableView.d.ts +5 -14
- package/types/NativeSlot.d.ts +32 -0
- package/types/Navigator.d.ts +10 -10
- package/types/OpenData.d.ts +5 -5
- package/types/PageContainer.d.ts +7 -10
- package/types/PageMeta.d.ts +14 -14
- package/types/Picker.d.ts +1 -5
- package/types/PickerView.d.ts +11 -21
- package/types/Progress.d.ts +5 -5
- package/types/RadioGroup.d.ts +5 -5
- package/types/RichText.d.ts +17 -17
- package/types/RtcRoom.d.ts +104 -0
- package/types/RtcRoomItem.d.ts +26 -0
- package/types/ScrollView.d.ts +46 -30
- package/types/Slider.d.ts +10 -10
- package/types/Slot.d.ts +1 -1
- package/types/Swiper.d.ts +31 -19
- package/types/Switch.d.ts +5 -5
- package/types/TabItem.d.ts +35 -0
- package/types/Tabs.d.ts +58 -0
- package/types/Textarea.d.ts +32 -32
- package/types/Video.d.ts +120 -111
- package/types/View.d.ts +20 -13
- package/types/VoipRoom.d.ts +5 -5
- package/types/WebView.d.ts +11 -5
- package/types/index.vue3.d.ts +267 -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/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
|
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
|
*/
|
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,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
|
/** 多选项目
|
|
@@ -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 }
|
package/types/CoverImage.d.ts
CHANGED
|
@@ -6,26 +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
|
-
* @supported alipay
|
|
26
|
-
*/
|
|
27
|
-
onTap?: CommonEventFunction
|
|
28
|
-
|
|
29
14
|
/** 设置与容器顶部的固定距离,效果相当于在 CSS 中设置 position: fixed 和 top 值,该属性优先级高于 fixed-bottom,CSS 设置的 position、top、bottom 值
|
|
30
15
|
* @supported swan
|
|
31
16
|
*/
|
|
@@ -55,6 +40,21 @@ interface CoverImageProps extends StandardProps {
|
|
|
55
40
|
* @supported qq
|
|
56
41
|
*/
|
|
57
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
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
/** 覆盖在原生组件之上的图片视图。可覆盖的原生组件同cover-view,支持嵌套在cover-view里。
|
package/types/CoverView.d.ts
CHANGED
|
@@ -7,11 +7,6 @@ interface CoverViewProps extends ViewProps {
|
|
|
7
7
|
*/
|
|
8
8
|
scrollTop?: number
|
|
9
9
|
|
|
10
|
-
/** 点击事件回调。
|
|
11
|
-
* @supported alipay
|
|
12
|
-
*/
|
|
13
|
-
onTap?: CommonEventFunction
|
|
14
|
-
|
|
15
10
|
/** 设置与容器顶部的固定距离,效果相当于在 CSS 中设置 position: fixed 和 top 值,该属性优先级高于 fixed-bottom,CSS 设置的 position、top、bottom 值
|
|
16
11
|
* @supported swan
|
|
17
12
|
*/
|
|
@@ -41,6 +36,11 @@ interface CoverViewProps extends ViewProps {
|
|
|
41
36
|
* @supported qq
|
|
42
37
|
*/
|
|
43
38
|
ariaLabel?: string
|
|
39
|
+
|
|
40
|
+
/** 点击事件回调。
|
|
41
|
+
* @supported alipay
|
|
42
|
+
*/
|
|
43
|
+
onTap?: CommonEventFunction
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
/** 覆盖在原生组件之上的文本视图。可覆盖的原生组件包括 map、video、canvas、camera、live-player、live-pusher 只支持嵌套 cover-view、cover-image,可在 cover-view 中使用 button。
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
import { StandardProps } from './common'
|
|
3
|
+
interface FollowSwanProps extends StandardProps {
|
|
4
|
+
/** 组件大小
|
|
5
|
+
* @supported swan
|
|
6
|
+
* @default "default"
|
|
7
|
+
*/
|
|
8
|
+
size?: string
|
|
9
|
+
|
|
10
|
+
/** 组件样式
|
|
11
|
+
* @supported swan
|
|
12
|
+
* @default "primary"
|
|
13
|
+
*/
|
|
14
|
+
type?: string
|
|
15
|
+
|
|
16
|
+
/** 关注和取消关注成功的回调,返回关注状态 {isFavor: true|false}
|
|
17
|
+
* @supported swan
|
|
18
|
+
*/
|
|
19
|
+
onFavorStatusChange?: CommonEventFunction
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** 关注小程序
|
|
23
|
+
* @classification open
|
|
24
|
+
* @supported swan
|
|
25
|
+
* @see https://smartprogram.baidu.com/docs/develop/extended/component-content/follow-swan/
|
|
26
|
+
*/
|
|
27
|
+
declare const FollowSwan: ComponentType<FollowSwanProps>
|
|
28
|
+
export { FollowSwan, FollowSwanProps }
|
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
|
|
@@ -63,16 +53,6 @@ interface ImageProps extends StandardProps {
|
|
|
63
53
|
*/
|
|
64
54
|
defaultSource?: string
|
|
65
55
|
|
|
66
|
-
/** 点击图片时触发。
|
|
67
|
-
* @supported alipay
|
|
68
|
-
*/
|
|
69
|
-
onTap?: CommonEventFunction
|
|
70
|
-
|
|
71
|
-
/** 点击图片时触发,阻止事件冒泡。
|
|
72
|
-
* @supported alipay
|
|
73
|
-
*/
|
|
74
|
-
catchTap?: CommonEventFunction
|
|
75
|
-
|
|
76
56
|
/** 阻止长按图片时弹起默认菜单(即将该属性设置为image-menu-prevent="true"或image-menu-prevent),只在初始化时有效,不能动态变更;若不想阻止弹起默认菜单,则不需要设置此属性。注:长按菜单后的操作暂不支持 svg 格式
|
|
77
57
|
* @supported swan
|
|
78
58
|
*/
|
|
@@ -92,6 +72,26 @@ interface ImageProps extends StandardProps {
|
|
|
92
72
|
* @supported qq
|
|
93
73
|
*/
|
|
94
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
|
|
95
95
|
}
|
|
96
96
|
declare namespace ImageProps {
|
|
97
97
|
/** mode 的合法值 */
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
import { StandardProps } from './common'
|
|
3
|
+
interface InlinePaymentPanelProps extends StandardProps {
|
|
4
|
+
/** 总金额,金额单位分,tip:仅支持整数型字符串
|
|
5
|
+
* @supported swan
|
|
6
|
+
*/
|
|
7
|
+
totalAmount?: string
|
|
8
|
+
|
|
9
|
+
/** 百度收银台的财务结算凭证,详见平台术语
|
|
10
|
+
* @supported swan
|
|
11
|
+
*/
|
|
12
|
+
dealId?: string
|
|
13
|
+
|
|
14
|
+
/** 支付能力开通后分配的支付 appKey,详见平台术语
|
|
15
|
+
* @supported swan
|
|
16
|
+
*/
|
|
17
|
+
appKey?: string
|
|
18
|
+
|
|
19
|
+
/** 平台营销信息,此处传当前订单中可使用平台券的 spuid,同时需在 支付能力中搭配使用传入该参数;注:仅与百度合作平台类目券的开发者需要填写该参数
|
|
20
|
+
* @supported swan
|
|
21
|
+
*/
|
|
22
|
+
promotionTag?: string | Array<string>
|
|
23
|
+
|
|
24
|
+
/** 是否设置挽留弹窗
|
|
25
|
+
* @supported swan
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
enablePageBackModal?: boolean
|
|
29
|
+
|
|
30
|
+
/** 自定义样式设置
|
|
31
|
+
* @supported swan
|
|
32
|
+
*/
|
|
33
|
+
customStyle?: string
|
|
34
|
+
|
|
35
|
+
/** 自定义样式档位配置,各档位配置项包括支付渠道/优惠券条高度、渠道图标大小、支付渠道文案字体大小、营销文案字体大小、选择器图标大小
|
|
36
|
+
* @supported swan
|
|
37
|
+
* @default "default"
|
|
38
|
+
*/
|
|
39
|
+
styleType?: 'tiny' | 'small' | 'default' | 'medium' | 'large'
|
|
40
|
+
|
|
41
|
+
/** 获取支付相关信息,具体信息在返回值的 detail 字段中
|
|
42
|
+
* @supported swan
|
|
43
|
+
*/
|
|
44
|
+
onGetPaymentInfo?: CommonEventFunction
|
|
45
|
+
|
|
46
|
+
/** 当发生错误时触发 error 事件,具体信息在返回值的 detail 字段中,例如 {detail: {errMsg: "something is wrong"}}
|
|
47
|
+
* @supported swan
|
|
48
|
+
*/
|
|
49
|
+
onError?: CommonEventFunction
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** 内嵌支付组件
|
|
53
|
+
* @classification open
|
|
54
|
+
* @supported swan
|
|
55
|
+
* @see https://smartprogram.baidu.com/docs/develop/component/inline_payment_panel/
|
|
56
|
+
*/
|
|
57
|
+
declare const InlinePaymentPanel: ComponentType<InlinePaymentPanelProps>
|
|
58
|
+
export { InlinePaymentPanel, InlinePaymentPanelProps }
|