@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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
|
|
3
|
+
interface NativeSlotProps {
|
|
4
|
+
/** 指定插入的 slot 位置
|
|
5
|
+
* @default none
|
|
6
|
+
* @supported weapp, swan, alipay, tt, jd, qq
|
|
7
|
+
*/
|
|
8
|
+
name?: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** 编译的原生组件支持使用 slot 插槽
|
|
12
|
+
* @supported weapp, swan, alipay, tt, jd, qq
|
|
13
|
+
* @version 3.5.7+
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* import { NativeSlot, View } from '@tarojs/components'
|
|
17
|
+
*
|
|
18
|
+
* export default function () {
|
|
19
|
+
* render () {
|
|
20
|
+
* return (
|
|
21
|
+
* <View>
|
|
22
|
+
* <NativeSlot />
|
|
23
|
+
* </View>
|
|
24
|
+
* )
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
* @see https://github.com/NervJS/taro/pull/12627
|
|
29
|
+
*/
|
|
30
|
+
declare const NativeSlot: ComponentType<NativeSlotProps>
|
|
31
|
+
|
|
32
|
+
export { NativeSlot, NativeSlotProps }
|
package/types/Navigator.d.ts
CHANGED
|
@@ -67,6 +67,16 @@ interface NavigatorProps extends StandardProps {
|
|
|
67
67
|
*/
|
|
68
68
|
hoverStayTime?: number
|
|
69
69
|
|
|
70
|
+
/** 当target="miniProgram"时有效,当传递该参数后,可以不传 app-id 和 path。链接可以通过【小程序菜单】->【复制链接】获取。
|
|
71
|
+
* @supported weapp
|
|
72
|
+
*/
|
|
73
|
+
shortLink?: string
|
|
74
|
+
|
|
75
|
+
/** 无障碍访问,(属性)元素的额外描述
|
|
76
|
+
* @supported qq
|
|
77
|
+
*/
|
|
78
|
+
ariaLabel?: string
|
|
79
|
+
|
|
70
80
|
/** 当 `target="miniProgram"` 时有效,跳转小程序成功
|
|
71
81
|
* @supported weapp, swan, qq
|
|
72
82
|
*/
|
|
@@ -81,16 +91,6 @@ interface NavigatorProps extends StandardProps {
|
|
|
81
91
|
* @supported weapp, swan, qq
|
|
82
92
|
*/
|
|
83
93
|
onComplete?: CommonEventFunction
|
|
84
|
-
|
|
85
|
-
/** 当target="miniProgram"时有效,当传递该参数后,可以不传 app-id 和 path。链接可以通过【小程序菜单】->【复制链接】获取。
|
|
86
|
-
* @supported weapp
|
|
87
|
-
*/
|
|
88
|
-
shortLink?: string
|
|
89
|
-
|
|
90
|
-
/** 无障碍访问,(属性)元素的额外描述
|
|
91
|
-
* @supported qq
|
|
92
|
-
*/
|
|
93
|
-
ariaLabel?: string
|
|
94
94
|
}
|
|
95
95
|
declare namespace NavigatorProps {
|
|
96
96
|
/** target 的合法值 */
|
package/types/OpenData.d.ts
CHANGED
|
@@ -27,11 +27,6 @@ interface OpenDataProps extends StandardProps {
|
|
|
27
27
|
*/
|
|
28
28
|
defaultAvatar?: string
|
|
29
29
|
|
|
30
|
-
/** 群名称或用户信息为空时触发
|
|
31
|
-
* @supported weapp, tt, qq
|
|
32
|
-
*/
|
|
33
|
-
onError?: CommonEventFunction
|
|
34
|
-
|
|
35
30
|
/** 当数据为空且未设置默认值时,是否显示官方默认值
|
|
36
31
|
* @supported tt
|
|
37
32
|
*/
|
|
@@ -51,6 +46,11 @@ interface OpenDataProps extends StandardProps {
|
|
|
51
46
|
* @supported qq
|
|
52
47
|
*/
|
|
53
48
|
componentData?: string
|
|
49
|
+
|
|
50
|
+
/** 群名称或用户信息为空时触发
|
|
51
|
+
* @supported weapp, tt, qq
|
|
52
|
+
*/
|
|
53
|
+
onError?: CommonEventFunction
|
|
54
54
|
}
|
|
55
55
|
declare namespace OpenDataProps {
|
|
56
56
|
/** type 的合法值 */
|
package/types/PageContainer.d.ts
CHANGED
|
@@ -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
|
|
@@ -50,6 +47,12 @@ interface PageContainerProps extends StandardProps {
|
|
|
50
47
|
*/
|
|
51
48
|
customStyle?: string
|
|
52
49
|
|
|
50
|
+
/** 是否在下滑一段距离后关闭
|
|
51
|
+
* @supported weapp
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
closeOnSlideDown?: string
|
|
55
|
+
|
|
53
56
|
/** 进入前触发
|
|
54
57
|
* @supported weapp, rn
|
|
55
58
|
*/
|
|
@@ -84,12 +87,6 @@ interface PageContainerProps extends StandardProps {
|
|
|
84
87
|
* @supported weapp
|
|
85
88
|
*/
|
|
86
89
|
onClickOverlay?: CommonEventFunction
|
|
87
|
-
|
|
88
|
-
/** 是否在下滑一段距离后关闭
|
|
89
|
-
* @supported weapp
|
|
90
|
-
* @default false
|
|
91
|
-
*/
|
|
92
|
-
closeOnSlideDown?: string
|
|
93
90
|
}
|
|
94
91
|
declare namespace PageContainerProps {
|
|
95
92
|
/** 弹出位置 */
|
package/types/PageMeta.d.ts
CHANGED
|
@@ -45,35 +45,35 @@ interface PageMetaProps extends StandardProps {
|
|
|
45
45
|
*/
|
|
46
46
|
rootFontSize?: string
|
|
47
47
|
|
|
48
|
-
/**
|
|
49
|
-
* @supported weapp
|
|
48
|
+
/** 页面内容的背景色,用于页面中的空白部分和页面大小变化 resize 动画期间的临时空闲区域
|
|
49
|
+
* @supported weapp, alipay
|
|
50
50
|
*/
|
|
51
|
-
|
|
51
|
+
rootBackgroundColor?: string
|
|
52
52
|
|
|
53
|
-
/**
|
|
53
|
+
/** 页面 page 的字体大小,可以设置为 system ,表示使用当前用户设置的微信字体大小
|
|
54
54
|
* @supported weapp, alipay
|
|
55
55
|
*/
|
|
56
|
-
|
|
56
|
+
pageFontSize?: string
|
|
57
57
|
|
|
58
|
-
/**
|
|
58
|
+
/** 页面的方向,可为 auto portrait 或 landscape
|
|
59
59
|
* @supported weapp
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
pageOrientation?: string
|
|
62
62
|
|
|
63
|
-
/**
|
|
64
|
-
* @supported weapp
|
|
63
|
+
/** 页面尺寸变化时会触发 resize 事件
|
|
64
|
+
* @supported weapp
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
onResize?: CommonEventFunction<PageMetaProps.onResizeEventDetail>
|
|
67
67
|
|
|
68
|
-
/**
|
|
68
|
+
/** 页面滚动时会触发 scroll 事件
|
|
69
69
|
* @supported weapp, alipay
|
|
70
70
|
*/
|
|
71
|
-
|
|
71
|
+
onScroll?: CommonEventFunction<PageMetaProps.onScrollEventDetail>
|
|
72
72
|
|
|
73
|
-
/**
|
|
73
|
+
/** 如果通过改变 scroll-top 属性来使页面滚动,页面滚动结束后会触发 scrolldone 事件
|
|
74
74
|
* @supported weapp
|
|
75
75
|
*/
|
|
76
|
-
|
|
76
|
+
onScrollDone?: CommonEventFunction
|
|
77
77
|
}
|
|
78
78
|
declare namespace PageMetaProps {
|
|
79
79
|
interface onResizeEventDetail {
|
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
|
-
|
|
|
440
|
-
| PickerTimeProps
|
|
441
|
-
| PickerDateProps
|
|
442
|
-
| PickerRegionProps
|
|
443
|
-
| PickerSelectorProps
|
|
439
|
+
PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps
|
|
444
440
|
>
|
|
445
441
|
export {
|
|
446
442
|
Picker,
|
package/types/PickerView.d.ts
CHANGED
|
@@ -32,21 +32,6 @@ interface PickerViewProps extends StandardProps {
|
|
|
32
32
|
*/
|
|
33
33
|
immediateChange?: boolean
|
|
34
34
|
|
|
35
|
-
/** 当滚动选择,value 改变时触发 change 事件,event.detail = {value: value};value为数组,表示 picker-view 内的 picker-view-column 当前选择的是第几项(下标从 0 开始)
|
|
36
|
-
* @supported weapp, alipay, swan, tt, qq, jd, rn
|
|
37
|
-
*/
|
|
38
|
-
onChange?: CommonEventFunction<PickerViewProps.onChangeEventDetail>
|
|
39
|
-
|
|
40
|
-
/** 当滚动选择开始时候触发事件
|
|
41
|
-
* @supported weapp, tt, qq
|
|
42
|
-
*/
|
|
43
|
-
onPickStart?: CommonEventFunction
|
|
44
|
-
|
|
45
|
-
/** 当滚动选择结束时候触发事件
|
|
46
|
-
* @supported weapp, tt, qq
|
|
47
|
-
*/
|
|
48
|
-
onPickEnd?: CommonEventFunction
|
|
49
|
-
|
|
50
35
|
/** 选择器标题,建议标题控制在 12 个中文汉字长度内,避免出现截断现象, 截断部分将以 ... 形式展示
|
|
51
36
|
* @supported swan
|
|
52
37
|
*/
|
|
@@ -57,15 +42,20 @@ interface PickerViewProps extends StandardProps {
|
|
|
57
42
|
*/
|
|
58
43
|
ariaLabel?: string
|
|
59
44
|
|
|
60
|
-
/**
|
|
61
|
-
* @supported alipay
|
|
45
|
+
/** 当滚动选择,value 改变时触发 change 事件,event.detail = {value: value};value为数组,表示 picker-view 内的 picker-view-column 当前选择的是第几项(下标从 0 开始)
|
|
46
|
+
* @supported weapp, alipay, swan, tt, qq, jd, rn
|
|
62
47
|
*/
|
|
63
|
-
|
|
48
|
+
onChange?: CommonEventFunction<PickerViewProps.onChangeEventDetail>
|
|
64
49
|
|
|
65
|
-
/**
|
|
66
|
-
* @supported alipay
|
|
50
|
+
/** 当滚动选择开始时候触发事件
|
|
51
|
+
* @supported weapp, alipay, tt, qq
|
|
67
52
|
*/
|
|
68
|
-
|
|
53
|
+
onPickStart?: CommonEventFunction
|
|
54
|
+
|
|
55
|
+
/** 当滚动选择结束时候触发事件
|
|
56
|
+
* @supported weapp, alipay, tt, qq
|
|
57
|
+
*/
|
|
58
|
+
onPickEnd?: CommonEventFunction
|
|
69
59
|
}
|
|
70
60
|
declare namespace PickerViewProps {
|
|
71
61
|
interface onChangeEventDetail {
|
package/types/Progress.d.ts
CHANGED
|
@@ -68,15 +68,15 @@ interface ProgressProps extends StandardProps {
|
|
|
68
68
|
*/
|
|
69
69
|
duration?: number
|
|
70
70
|
|
|
71
|
-
/** 动画完成事件
|
|
72
|
-
* @supported weapp, qq, jd, h5
|
|
73
|
-
*/
|
|
74
|
-
onActiveEnd?: CommonEventFunction
|
|
75
|
-
|
|
76
71
|
/** 无障碍访问,(属性)元素的额外描述
|
|
77
72
|
* @supported qq
|
|
78
73
|
*/
|
|
79
74
|
ariaLabel?: string
|
|
75
|
+
|
|
76
|
+
/** 动画完成事件
|
|
77
|
+
* @supported weapp, qq, jd, h5
|
|
78
|
+
*/
|
|
79
|
+
onActiveEnd?: CommonEventFunction
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/** 进度条。组件属性的长度单位默认为 px
|
package/types/RadioGroup.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
3
3
|
interface RadioGroupProps extends StandardProps, FormItemProps {
|
|
4
|
-
/** RadioGroup 中选中项发生改变时触发 change 事件,detail = {value:[选中的radio的value的数组]}
|
|
5
|
-
* @supported weapp, alipay, swan, tt, qq, h5
|
|
6
|
-
*/
|
|
7
|
-
onChange?: CommonEventFunction
|
|
8
|
-
|
|
9
4
|
/** 组件名字,用于表单提交获取数据。
|
|
10
5
|
* @supported alipay, tt
|
|
11
6
|
*/
|
|
12
7
|
name?: string
|
|
8
|
+
|
|
9
|
+
/** RadioGroup 中选中项发生改变时触发 change 事件,detail = {value:[选中的radio的value的数组]}
|
|
10
|
+
* @supported weapp, alipay, swan, tt, qq, h5
|
|
11
|
+
*/
|
|
12
|
+
onChange?: CommonEventFunction
|
|
13
13
|
}
|
|
14
14
|
declare namespace RadioGroupProps {
|
|
15
15
|
interface onChangeEventDetail {
|
package/types/RichText.d.ts
CHANGED
|
@@ -15,6 +15,23 @@ interface RichTextProps extends StandardProps {
|
|
|
15
15
|
*/
|
|
16
16
|
space?: keyof RichTextProps.TSpace
|
|
17
17
|
|
|
18
|
+
/** 富文本是否可以长按选中,可用于复制,粘贴,长按搜索等场景
|
|
19
|
+
* @default false(基础库 3.150.1 以前版本)true(基础库 3.150.1 及以后版本)
|
|
20
|
+
* @supported swan
|
|
21
|
+
*/
|
|
22
|
+
selectable?: string
|
|
23
|
+
|
|
24
|
+
/** 阻止长按图片时弹起默认菜单(将该属性设置为image-menu-prevent或image-menu-prevent="true"),只在初始化时有效,不能动态变更;若不想阻止弹起默认菜单,则不需要设置此属性
|
|
25
|
+
* @default false
|
|
26
|
+
* @supported swan
|
|
27
|
+
*/
|
|
28
|
+
imageMenuPrevent?: string
|
|
29
|
+
|
|
30
|
+
/** 富文本中的图片是否可点击预览。在不设置的情况下,若 rich-text 未监听点击事件,则默认开启。未显示设置 preview 时会进行点击默认预览判断,建议显示设置 preview
|
|
31
|
+
* @supported swan
|
|
32
|
+
*/
|
|
33
|
+
preview?: string
|
|
34
|
+
|
|
18
35
|
/** 触摸。
|
|
19
36
|
* @supported alipay
|
|
20
37
|
*/
|
|
@@ -44,23 +61,6 @@ interface RichTextProps extends StandardProps {
|
|
|
44
61
|
* @supported alipay
|
|
45
62
|
*/
|
|
46
63
|
onLongtap?: CommonEventFunction
|
|
47
|
-
|
|
48
|
-
/** 富文本是否可以长按选中,可用于复制,粘贴,长按搜索等场景
|
|
49
|
-
* @default false(基础库 3.150.1 以前版本)true(基础库 3.150.1 及以后版本)
|
|
50
|
-
* @supported swan
|
|
51
|
-
*/
|
|
52
|
-
selectable?: string
|
|
53
|
-
|
|
54
|
-
/** 阻止长按图片时弹起默认菜单(将该属性设置为image-menu-prevent或image-menu-prevent="true"),只在初始化时有效,不能动态变更;若不想阻止弹起默认菜单,则不需要设置此属性
|
|
55
|
-
* @default false
|
|
56
|
-
* @supported swan
|
|
57
|
-
*/
|
|
58
|
-
imageMenuPrevent?: string
|
|
59
|
-
|
|
60
|
-
/** 富文本中的图片是否可点击预览。在不设置的情况下,若 rich-text 未监听点击事件,则默认开启。未显示设置 preview 时会进行点击默认预览判断,建议显示设置 preview
|
|
61
|
-
* @supported swan
|
|
62
|
-
*/
|
|
63
|
-
preview?: string
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/** 节点类型
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
import { StandardProps } from './common'
|
|
3
|
+
interface RtcRoomProps extends StandardProps {
|
|
4
|
+
/** rtc-room 组件的唯一标识符
|
|
5
|
+
* @supported swan
|
|
6
|
+
*/
|
|
7
|
+
id?: string
|
|
8
|
+
|
|
9
|
+
/** 是否开启摄像头
|
|
10
|
+
* @supported swan
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
enableCamera?: boolean
|
|
14
|
+
|
|
15
|
+
/** 是否开启摄像头自动对焦
|
|
16
|
+
* @supported swan
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
enableAutoFocus?: boolean
|
|
20
|
+
|
|
21
|
+
/** 是否支持双手滑动调整摄像头聚焦
|
|
22
|
+
* @supported swan
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
enableZoom?: boolean
|
|
26
|
+
|
|
27
|
+
/** 设置前置还是后置摄像头,有效值:front、back
|
|
28
|
+
* @supported swan
|
|
29
|
+
* @default "front"
|
|
30
|
+
*/
|
|
31
|
+
devicePosition?: 'front' | 'back'
|
|
32
|
+
|
|
33
|
+
/** 是否开启麦克风
|
|
34
|
+
* @supported swan
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
enableMic?: boolean
|
|
38
|
+
|
|
39
|
+
/** 是否开启音频自动增益
|
|
40
|
+
* @supported swan
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
enableAgc?: boolean
|
|
44
|
+
|
|
45
|
+
/** 是否开启音频噪声抑制
|
|
46
|
+
* @supported swan
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
enableAns?: boolean
|
|
50
|
+
|
|
51
|
+
/** 最大码率
|
|
52
|
+
* @supported swan
|
|
53
|
+
* @default 900
|
|
54
|
+
*/
|
|
55
|
+
bitrate?: number
|
|
56
|
+
|
|
57
|
+
/** 视频分辨率宽
|
|
58
|
+
* @supported swan
|
|
59
|
+
* @default 360
|
|
60
|
+
*/
|
|
61
|
+
videoWidth?: number
|
|
62
|
+
|
|
63
|
+
/** 视频分辨率高
|
|
64
|
+
* @supported swan
|
|
65
|
+
* @default 640
|
|
66
|
+
*/
|
|
67
|
+
videoHeight?: number
|
|
68
|
+
|
|
69
|
+
/** 设置远端看到的画面的镜像效果,该属性的变化不会影响到本地画面,仅影响远端看到的画面效果
|
|
70
|
+
* @supported swan
|
|
71
|
+
* @default false
|
|
72
|
+
*/
|
|
73
|
+
enableRemoteMirror?: boolean
|
|
74
|
+
|
|
75
|
+
/** 设置本地摄像头预览画面的镜像效果,有效值:auto、enable、disable
|
|
76
|
+
* @supported swan
|
|
77
|
+
* @default "auto"
|
|
78
|
+
*/
|
|
79
|
+
localMirror?: 'auto' | 'enable' | 'disable'
|
|
80
|
+
|
|
81
|
+
/** 设置声音输出方式,有效值:speaker、ear
|
|
82
|
+
* @supported swan
|
|
83
|
+
* @default "speaker"
|
|
84
|
+
*/
|
|
85
|
+
soundMode?: 'speaker' | 'ear'
|
|
86
|
+
|
|
87
|
+
/** 房间状态变化事件,参考下方状态码,detail = { code, msg, userInfo }
|
|
88
|
+
* @supported swan
|
|
89
|
+
*/
|
|
90
|
+
onStateChange?: CommonEventFunction
|
|
91
|
+
|
|
92
|
+
/** 错误事件。参考下方错误码,detail = { errMsg, errCode }
|
|
93
|
+
* @supported swan
|
|
94
|
+
*/
|
|
95
|
+
onError?: CommonEventFunction
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** 实时音视频通话房间
|
|
99
|
+
* @classification media
|
|
100
|
+
* @supported swan
|
|
101
|
+
* @see https://smartprogram.baidu.com/docs/develop/component/media_rtc-room/
|
|
102
|
+
*/
|
|
103
|
+
declare const RtcRoom: ComponentType<RtcRoomProps>
|
|
104
|
+
export { RtcRoom, RtcRoomProps }
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ComponentType } from 'react'
|
|
2
|
+
import { StandardProps } from './common'
|
|
3
|
+
interface RtcRoomItemProps extends StandardProps {
|
|
4
|
+
/** rtc-room-item 组件的唯一标识符
|
|
5
|
+
* @supported swan
|
|
6
|
+
*/
|
|
7
|
+
id?: string
|
|
8
|
+
|
|
9
|
+
/** 指定 item 展示本地 / 远端画面,有效值:local、remote ,不可动态变更
|
|
10
|
+
* @supported swan
|
|
11
|
+
*/
|
|
12
|
+
type?: string
|
|
13
|
+
|
|
14
|
+
/** item 展示画面的用户 id
|
|
15
|
+
* @supported swan
|
|
16
|
+
*/
|
|
17
|
+
userId?: number
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** 实时音视频通话画面
|
|
21
|
+
* @classification media
|
|
22
|
+
* @supported swan
|
|
23
|
+
* @see https://smartprogram.baidu.com/docs/develop/component/media_rtc-room-item/
|
|
24
|
+
*/
|
|
25
|
+
declare const RtcRoomItem: ComponentType<RtcRoomItemProps>
|
|
26
|
+
export { RtcRoomItem, RtcRoomItemProps }
|
package/types/ScrollView.d.ts
CHANGED
|
@@ -126,6 +126,38 @@ interface ScrollViewProps extends StandardProps {
|
|
|
126
126
|
*/
|
|
127
127
|
fastDeceleration?: boolean
|
|
128
128
|
|
|
129
|
+
/** 当 scroll-with-animation设置为 true 时,可以设置 scroll-animation-duration 来控制动画的执行时间,单位 ms。
|
|
130
|
+
* @supported alipay
|
|
131
|
+
*/
|
|
132
|
+
scrollAnimationDuration?: string
|
|
133
|
+
|
|
134
|
+
/** 纵向滚动时,当滚动到顶部或底部时,强制禁止触发页面滚动,仍然只触发 scroll-view 自身的滚动。
|
|
135
|
+
* @supported alipay
|
|
136
|
+
* @default false
|
|
137
|
+
*/
|
|
138
|
+
trapScroll?: string
|
|
139
|
+
|
|
140
|
+
/** 发生滚动前,对滚动方向进行判断,当方向是顶部/左边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到顶部/左边,禁止滚动。
|
|
141
|
+
* @supported alipay
|
|
142
|
+
*/
|
|
143
|
+
disableLowerScroll?: string
|
|
144
|
+
|
|
145
|
+
/** 发生滚动前,对滚动方向进行判断,当方向是底部/右边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到底部/右边,禁止滚动。
|
|
146
|
+
* @supported alipay
|
|
147
|
+
*/
|
|
148
|
+
disableUpperScroll?: string
|
|
149
|
+
|
|
150
|
+
/** 无障碍访问,(属性)元素的额外描述
|
|
151
|
+
* @supported qq
|
|
152
|
+
*/
|
|
153
|
+
ariaLabel?: string
|
|
154
|
+
|
|
155
|
+
/** 开启 passive 特性,能优化一定的滚动性能
|
|
156
|
+
* @supported weapp
|
|
157
|
+
* @default false
|
|
158
|
+
*/
|
|
159
|
+
enablePassive?: string
|
|
160
|
+
|
|
129
161
|
/** 滚动到顶部/左边,会触发 scrolltoupper 事件
|
|
130
162
|
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
131
163
|
*/
|
|
@@ -164,28 +196,17 @@ interface ScrollViewProps extends StandardProps {
|
|
|
164
196
|
/** 滑动开始事件 (同时开启 enhanced 属性后生效)
|
|
165
197
|
* @supported weapp
|
|
166
198
|
*/
|
|
167
|
-
onDragStart?: CommonEventFunction
|
|
199
|
+
onDragStart?: CommonEventFunction<ScrollViewProps.onDragDetail>
|
|
168
200
|
|
|
169
201
|
/** 滑动事件 (同时开启 enhanced 属性后生效)
|
|
170
202
|
* @supported weapp
|
|
171
203
|
*/
|
|
172
|
-
onDragging?: CommonEventFunction
|
|
204
|
+
onDragging?: CommonEventFunction<ScrollViewProps.onDragDetail>
|
|
173
205
|
|
|
174
|
-
/** 滑动结束事件 (同时开启 enhanced 属性后生效)
|
|
206
|
+
/** 滑动结束事件 (同时开启 enhanced 属性后生效)
|
|
175
207
|
* @supported weapp
|
|
176
208
|
*/
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
/** 当 scroll-with-animation设置为 true 时,可以设置 scroll-animation-duration 来控制动画的执行时间,单位 ms。
|
|
180
|
-
* @supported alipay
|
|
181
|
-
*/
|
|
182
|
-
scrollAnimationDuration?: string
|
|
183
|
-
|
|
184
|
-
/** 纵向滚动时,当滚动到顶部或底部时,强制禁止触发页面滚动,仍然只触发 scroll-view 自身的滚动。
|
|
185
|
-
* @supported alipay
|
|
186
|
-
* @default false
|
|
187
|
-
*/
|
|
188
|
-
trapScroll?: string
|
|
209
|
+
onDragEnd?: CommonEventFunction<ScrollViewProps.onDragDetail>
|
|
189
210
|
|
|
190
211
|
/** 触摸动作开始。
|
|
191
212
|
* @supported alipay
|
|
@@ -206,21 +227,6 @@ interface ScrollViewProps extends StandardProps {
|
|
|
206
227
|
* @supported alipay
|
|
207
228
|
*/
|
|
208
229
|
onTouchCancel?: CommonEventFunction
|
|
209
|
-
|
|
210
|
-
/** 发生滚动前,对滚动方向进行判断,当方向是顶部/左边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到顶部/左边,禁止滚动。
|
|
211
|
-
* @supported alipay
|
|
212
|
-
*/
|
|
213
|
-
disableLowerScroll?: string
|
|
214
|
-
|
|
215
|
-
/** 发生滚动前,对滚动方向进行判断,当方向是底部/右边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到底部/右边,禁止滚动。
|
|
216
|
-
* @supported alipay
|
|
217
|
-
*/
|
|
218
|
-
disableUpperScroll?: string
|
|
219
|
-
|
|
220
|
-
/** 无障碍访问,(属性)元素的额外描述
|
|
221
|
-
* @supported qq
|
|
222
|
-
*/
|
|
223
|
-
ariaLabel?: string
|
|
224
230
|
}
|
|
225
231
|
declare namespace ScrollViewProps {
|
|
226
232
|
interface onScrollDetail {
|
|
@@ -238,6 +244,16 @@ declare namespace ScrollViewProps {
|
|
|
238
244
|
deltaX: number
|
|
239
245
|
deltaY: number
|
|
240
246
|
}
|
|
247
|
+
interface onDragDetail {
|
|
248
|
+
/** 横向滚动条位置 */
|
|
249
|
+
scrollLeft: number
|
|
250
|
+
|
|
251
|
+
/** 竖向滚动条位置 */
|
|
252
|
+
scrollTop: number
|
|
253
|
+
|
|
254
|
+
/** 滚动速度 */
|
|
255
|
+
velocity: number
|
|
256
|
+
}
|
|
241
257
|
}
|
|
242
258
|
|
|
243
259
|
/** 可滚动视图区域。使用竖向滚动时,需要给scroll-view一个固定高度,通过 WXSS 设置 height。组件属性的长度单位默认为 px
|
package/types/Slider.d.ts
CHANGED
|
@@ -73,16 +73,6 @@ interface SliderProps extends StandardProps, FormItemProps {
|
|
|
73
73
|
*/
|
|
74
74
|
showValue?: boolean
|
|
75
75
|
|
|
76
|
-
/** 完成一次拖动后触发的事件
|
|
77
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
78
|
-
*/
|
|
79
|
-
onChange?: CommonEventFunction<SliderProps.onChangeEventDetail>
|
|
80
|
-
|
|
81
|
-
/** 拖动过程中触发的事件
|
|
82
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
83
|
-
*/
|
|
84
|
-
onChanging?: CommonEventFunction<SliderProps.onChangeEventDetail>
|
|
85
|
-
|
|
86
76
|
/** 组件名字,用于表单提交获取数据。
|
|
87
77
|
* @supported alipay
|
|
88
78
|
*/
|
|
@@ -109,6 +99,16 @@ interface SliderProps extends StandardProps, FormItemProps {
|
|
|
109
99
|
* @supported qq
|
|
110
100
|
*/
|
|
111
101
|
ariaLabel?: string
|
|
102
|
+
|
|
103
|
+
/** 完成一次拖动后触发的事件
|
|
104
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
105
|
+
*/
|
|
106
|
+
onChange?: CommonEventFunction<SliderProps.onChangeEventDetail>
|
|
107
|
+
|
|
108
|
+
/** 拖动过程中触发的事件
|
|
109
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
110
|
+
*/
|
|
111
|
+
onChanging?: CommonEventFunction<SliderProps.onChangeEventDetail>
|
|
112
112
|
}
|
|
113
113
|
declare namespace SliderProps {
|
|
114
114
|
interface onChangeEventDetail {
|