@tarojs/components 3.5.5 → 3.5.6
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/taro-input-core.cjs.entry.js +24 -3
- package/dist/cjs/taro-video-control_3.cjs.entry.js +21 -3
- package/dist/collection/components/input/input.js +24 -3
- package/dist/collection/components/video/video.js +23 -3
- package/dist/collection/utils/json-schema-to-types.js +224 -0
- package/dist/esm/taro-input-core.entry.js +24 -3
- package/dist/esm/taro-video-control_3.entry.js +21 -3
- package/dist/esm-es5/taro-input-core.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
- package/dist/taro-components/p-0380841f.system.js +1 -1
- package/dist/taro-components/p-232ebfae.system.entry.js +1 -0
- package/dist/taro-components/{p-7e8943d8.entry.js → p-3744e978.entry.js} +1 -1
- package/dist/taro-components/p-56c86512.entry.js +1 -0
- package/dist/taro-components/{p-ed8c1bb8.system.entry.js → p-f81a74bb.system.entry.js} +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/input/input.d.ts +1 -0
- package/dist/types/utils/json-schema-to-types.d.ts +25 -0
- package/dist-h5/react/components/index.js +5 -5
- package/package.json +9 -5
- package/types/Ad.d.ts +99 -9
- package/types/AdCustom.d.ts +1 -3
- package/types/Audio.d.ts +16 -16
- package/types/Block.d.ts +0 -2
- package/types/Button.d.ts +187 -47
- package/types/Camera.d.ts +20 -18
- package/types/Canvas.d.ts +52 -13
- package/types/Checkbox.d.ts +13 -10
- package/types/CheckboxGroup.d.ts +5 -7
- package/types/CoverImage.d.ts +44 -5
- package/types/CoverView.d.ts +34 -10
- package/types/Editor.d.ts +4 -6
- package/types/Form.d.ts +23 -7
- package/types/FunctionalPageNavigator.d.ts +5 -3
- package/types/Icon.d.ts +19 -7
- package/types/Image.d.ts +71 -14
- package/types/Input.d.ts +44 -33
- package/types/Label.d.ts +0 -3
- package/types/LivePlayer.d.ts +80 -24
- package/types/LivePusher.d.ts +78 -37
- package/types/Map.d.ts +208 -66
- package/types/MatchMedia.d.ts +8 -10
- package/types/MovableArea.d.ts +1 -3
- package/types/MovableView.d.ts +88 -30
- package/types/NavigationBar.d.ts +0 -2
- package/types/Navigator.d.ts +35 -18
- package/types/OfficialAccount.d.ts +10 -3
- package/types/OpenData.d.ts +35 -6
- package/types/PageContainer.d.ts +13 -10
- package/types/PageMeta.d.ts +27 -13
- package/types/Picker.d.ts +50 -14
- package/types/PickerView.d.ts +31 -13
- package/types/PickerViewColumn.d.ts +0 -2
- package/types/Progress.d.ts +17 -14
- package/types/Radio.d.ts +16 -6
- package/types/RadioGroup.d.ts +6 -4
- package/types/RichText.d.ts +53 -5
- package/types/RootPortal.d.ts +2 -1
- package/types/ScrollView.d.ts +82 -19
- package/types/ShareElement.d.ts +5 -7
- package/types/Slider.d.ts +41 -17
- package/types/Swiper.d.ts +100 -22
- package/types/SwiperItem.d.ts +6 -3
- package/types/Switch.d.ts +22 -8
- package/types/Text.d.ts +10 -6
- package/types/Textarea.d.ts +61 -28
- package/types/Video.d.ts +331 -50
- package/types/View.d.ts +122 -9
- package/types/VoipRoom.d.ts +6 -9
- package/types/WebView.d.ts +9 -7
- package/types/common.d.ts +1 -1
- package/types/index.vue3.d.ts +261 -138
- package/dist/taro-components/p-1b356f4d.entry.js +0 -1
- package/dist/taro-components/p-a39276ff.system.entry.js +0 -1
package/types/View.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StyleProp, ViewStyle } from 'react-native'
|
|
3
|
-
import { StandardProps } from './common'
|
|
4
|
-
|
|
3
|
+
import { CommonEventFunction, StandardProps } from './common'
|
|
5
4
|
interface ViewProps extends StandardProps {
|
|
6
5
|
/** 指定按下去的样式类。当 `hover-class="none"` 时,没有点击态效果
|
|
7
6
|
* @default none
|
|
8
|
-
* @supported weapp,
|
|
7
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
9
8
|
* @rn 由于 RN 不支持 hoverClass,故 RN 端的 View 组件实现了 `hoverStyle`属性,写法和 style 类似,只不过 `hoverStyle` 的样式是指定按下去的样式。
|
|
10
9
|
*/
|
|
11
10
|
hoverClass?: string
|
|
@@ -18,24 +17,139 @@ interface ViewProps extends StandardProps {
|
|
|
18
17
|
|
|
19
18
|
/** 指定是否阻止本节点的祖先节点出现点击态
|
|
20
19
|
* @default false
|
|
21
|
-
* @supported weapp, swan,
|
|
20
|
+
* @supported weapp, alipay, swan, tt, qq, jd
|
|
22
21
|
*/
|
|
23
22
|
hoverStopPropagation?: boolean
|
|
24
23
|
|
|
25
24
|
/** 按住后多久出现点击态,单位毫秒
|
|
26
25
|
* @default 50
|
|
27
|
-
* @supported weapp,
|
|
26
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
28
27
|
*/
|
|
29
28
|
hoverStartTime?: number
|
|
30
29
|
|
|
31
30
|
/** 手指松开后点击态保留时间,单位毫秒
|
|
32
31
|
* @default 400
|
|
33
|
-
* @supported weapp,
|
|
32
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
34
33
|
*/
|
|
35
34
|
hoverStayTime?: number
|
|
36
35
|
|
|
37
|
-
/**
|
|
38
|
-
|
|
36
|
+
/** 是否阻止区域内滚动页面。
|
|
37
|
+
* 默认值: false
|
|
38
|
+
* 说明: 如果 view 中嵌套 view,外层 view 设置 disable-scroll 为 true 时禁止内部的滚动。
|
|
39
|
+
* @supported alipay
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
disableScroll?: string
|
|
43
|
+
|
|
44
|
+
/** 是否隐藏。
|
|
45
|
+
* 默认值: false
|
|
46
|
+
* @supported alipay
|
|
47
|
+
* @default false
|
|
48
|
+
*/
|
|
49
|
+
hidden?: boolean
|
|
50
|
+
|
|
51
|
+
/** 自定义样式名。
|
|
52
|
+
* @supported alipay
|
|
53
|
+
*/
|
|
54
|
+
class?: string
|
|
55
|
+
|
|
56
|
+
/** 内联样式。
|
|
57
|
+
* @supported alipay
|
|
58
|
+
*/
|
|
59
|
+
style?: string
|
|
60
|
+
|
|
61
|
+
/** 用于动画,详见 my.createAnimation 。使用 my.createAnimation 生成的动画是通过过渡(Transition)实现的,只会触发 onTransitionEnd,不会触发 onAnimationStart, onAnimationIteration, onAnimationEnd。
|
|
62
|
+
* 默认值:{}
|
|
63
|
+
* @supported alipay
|
|
64
|
+
*/
|
|
65
|
+
animation?: TaroGeneral.IAnyObject
|
|
66
|
+
|
|
67
|
+
/** 点击。
|
|
68
|
+
* @supported alipay
|
|
69
|
+
*/
|
|
70
|
+
onTap?: CommonEventFunction
|
|
71
|
+
|
|
72
|
+
/** 触摸动作开始。
|
|
73
|
+
* @supported alipay
|
|
74
|
+
*/
|
|
75
|
+
onTouchStart?: CommonEventFunction
|
|
76
|
+
|
|
77
|
+
/** 触摸后移动。
|
|
78
|
+
* @supported alipay
|
|
79
|
+
*/
|
|
80
|
+
onTouchMove?: CommonEventFunction
|
|
81
|
+
|
|
82
|
+
/** 触摸动作结束。
|
|
83
|
+
* @supported alipay
|
|
84
|
+
*/
|
|
85
|
+
onTouchEnd?: CommonEventFunction
|
|
86
|
+
|
|
87
|
+
/** 触摸动作被打断,如来电提醒,弹窗。
|
|
88
|
+
* @supported alipay
|
|
89
|
+
*/
|
|
90
|
+
onTouchCancel?: CommonEventFunction
|
|
91
|
+
|
|
92
|
+
/** 长按 500ms 之后触发,触发了长按事件后进行移动将不会触发屏幕的滚动。
|
|
93
|
+
* @supported alipay
|
|
94
|
+
*/
|
|
95
|
+
onLongTap?: CommonEventFunction
|
|
96
|
+
|
|
97
|
+
/** 过渡(Transition)结束时触发。
|
|
98
|
+
* 版本要求: 基础库 1.8.0 及以上
|
|
99
|
+
* @supported alipay
|
|
100
|
+
*/
|
|
101
|
+
onTransitionEnd?: CommonEventFunction
|
|
102
|
+
|
|
103
|
+
/** 每开启一次新的动画过程时触发。(第一次不触发)
|
|
104
|
+
* 版本要求: 基础库 1.8.0 及以上
|
|
105
|
+
* @supported alipay
|
|
106
|
+
*/
|
|
107
|
+
onAnimationIteration?: CommonEventFunction
|
|
108
|
+
|
|
109
|
+
/** 动画开始时触发。
|
|
110
|
+
* 版本要求: 基础库 1.8.0 及以上
|
|
111
|
+
* @supported alipay
|
|
112
|
+
*/
|
|
113
|
+
onAnimationStart?: CommonEventFunction
|
|
114
|
+
|
|
115
|
+
/** 动画结束时触发。
|
|
116
|
+
* 版本要求: 基础库 1.8.0 及以上
|
|
117
|
+
* @supported alipay
|
|
118
|
+
*/
|
|
119
|
+
onAnimationEnd?: CommonEventFunction
|
|
120
|
+
|
|
121
|
+
/** 当前元素可见面积超过50%时触发。
|
|
122
|
+
* 版本要求: 基础库 1.9.0 及以上
|
|
123
|
+
* @supported alipay
|
|
124
|
+
*/
|
|
125
|
+
onAppear?: CommonEventFunction
|
|
126
|
+
|
|
127
|
+
/** 当前元素不可见面积超过50%时触发。
|
|
128
|
+
* 版本要求: 基础库 1.9.0 及以上
|
|
129
|
+
* @supported alipay
|
|
130
|
+
*/
|
|
131
|
+
onDisappear?: CommonEventFunction
|
|
132
|
+
|
|
133
|
+
/** 当前元素首次可见面积达到50%时触发。
|
|
134
|
+
* 版本要求: 基础库 1.9.4 及以上
|
|
135
|
+
* @supported alipay
|
|
136
|
+
*/
|
|
137
|
+
onFirstAppear?: CommonEventFunction
|
|
138
|
+
|
|
139
|
+
/** 表示组件的语义角色。设置为 img 时,组件聚焦后读屏软件会朗读出 图像 ;设置为 button 时,聚焦后读屏软件会朗读出 按钮 。详情请参见 aria-component。
|
|
140
|
+
* @supported alipay
|
|
141
|
+
*/
|
|
142
|
+
role?: string
|
|
143
|
+
|
|
144
|
+
/** 无障碍访问,(角色)标识元素的作用
|
|
145
|
+
* @supported qq
|
|
146
|
+
*/
|
|
147
|
+
ariaRole?: string
|
|
148
|
+
|
|
149
|
+
/** 无障碍访问,(属性)元素的额外描述
|
|
150
|
+
* @supported qq
|
|
151
|
+
*/
|
|
152
|
+
ariaLabel?: string
|
|
39
153
|
}
|
|
40
154
|
|
|
41
155
|
/** 视图容器
|
|
@@ -103,5 +217,4 @@ interface ViewProps extends StandardProps {
|
|
|
103
217
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/view.html
|
|
104
218
|
*/
|
|
105
219
|
declare const View: ComponentType<ViewProps>
|
|
106
|
-
|
|
107
220
|
export { View, ViewProps }
|
package/types/VoipRoom.d.ts
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { CommonEventFunction, StandardProps } from './common'
|
|
3
|
-
|
|
4
3
|
interface VoipRoomProps extends StandardProps {
|
|
5
|
-
/** 进入房间用户的 openid
|
|
6
|
-
* @default none
|
|
7
|
-
* @supported weapp
|
|
8
|
-
*/
|
|
9
|
-
openId?: string
|
|
10
|
-
|
|
11
4
|
/** 对话窗口类型,自身传入 camera,其它用户传入 video
|
|
12
5
|
* @default camera
|
|
13
6
|
* @supported weapp
|
|
@@ -24,8 +17,13 @@ interface VoipRoomProps extends StandardProps {
|
|
|
24
17
|
* @supported weapp
|
|
25
18
|
*/
|
|
26
19
|
onError?: CommonEventFunction
|
|
27
|
-
}
|
|
28
20
|
|
|
21
|
+
/** 进入房间用户的 openid
|
|
22
|
+
* @default none
|
|
23
|
+
* @supported weapp
|
|
24
|
+
*/
|
|
25
|
+
openid?: string
|
|
26
|
+
}
|
|
29
27
|
declare namespace VoipRoomProps {
|
|
30
28
|
/** 对话窗口类型 */
|
|
31
29
|
interface Mode {
|
|
@@ -66,5 +64,4 @@ declare namespace VoipRoomProps {
|
|
|
66
64
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/voip-room.html
|
|
67
65
|
*/
|
|
68
66
|
declare const VoipRoom: ComponentType<VoipRoomProps>
|
|
69
|
-
|
|
70
67
|
export { VoipRoom, VoipRoomProps }
|
package/types/WebView.d.ts
CHANGED
|
@@ -1,28 +1,31 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps, CommonEventFunction } from './common'
|
|
3
|
-
|
|
4
3
|
interface WebViewProps extends StandardProps {
|
|
5
4
|
/** webview 指向网页的链接。可打开关联的公众号的文章,其它网页需登录小程序管理后台配置业务域名。
|
|
6
|
-
* @supported weapp,
|
|
5
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
7
6
|
*/
|
|
8
7
|
src: string
|
|
9
8
|
|
|
10
9
|
/** 网页向小程序 postMessage 时,会在特定时机(小程序后退、组件销毁、分享)触发并收到消息。e.detail = { data }
|
|
11
|
-
* @supported weapp, tt
|
|
10
|
+
* @supported weapp, alipay, swan, tt, qq, jd
|
|
12
11
|
*/
|
|
13
12
|
onMessage?: CommonEventFunction<WebViewProps.onMessageEventDetail>
|
|
14
13
|
|
|
15
14
|
/** 网页加载成功时候触发此事件。e.detail = { src }
|
|
16
|
-
* @supported weapp, h5, rn
|
|
15
|
+
* @supported weapp, alipay, tt, qq, h5, rn
|
|
17
16
|
*/
|
|
18
17
|
onLoad?: CommonEventFunction<WebViewProps.onLoadEventDetail>
|
|
19
18
|
|
|
20
19
|
/** 网页加载失败的时候触发此事件。e.detail = { src }
|
|
21
|
-
* @supported weapp, h5, rn
|
|
20
|
+
* @supported weapp, alipay, tt, qq, h5, rn
|
|
22
21
|
*/
|
|
23
22
|
onError?: CommonEventFunction<WebViewProps.onErrorEventDetail>
|
|
24
|
-
}
|
|
25
23
|
|
|
24
|
+
/** webview 的进度条颜色
|
|
25
|
+
* @supported tt
|
|
26
|
+
*/
|
|
27
|
+
progressbarColor?: string
|
|
28
|
+
}
|
|
26
29
|
declare namespace WebViewProps {
|
|
27
30
|
interface onMessageEventDetail {
|
|
28
31
|
/** 消息数据,是多次 postMessage 的参数组成的数组 */
|
|
@@ -62,5 +65,4 @@ declare namespace WebViewProps {
|
|
|
62
65
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/web-view.html
|
|
63
66
|
*/
|
|
64
67
|
declare const WebView: ComponentType<WebViewProps>
|
|
65
|
-
|
|
66
68
|
export { WebView, WebViewProps }
|
package/types/common.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export interface StandardProps<T = any, TouchEvent extends BaseTouchEvent<any> =
|
|
|
16
16
|
/** 组件是否显示, 所有组件默认显示 */
|
|
17
17
|
hidden?: boolean
|
|
18
18
|
/** 动画属性 */
|
|
19
|
-
animation?: { actions: TaroGeneral.IAnyObject[] }
|
|
19
|
+
animation?: { actions: TaroGeneral.IAnyObject[] } | TaroGeneral.IAnyObject
|
|
20
20
|
/** 引用 */
|
|
21
21
|
ref?: LegacyRef<T>
|
|
22
22
|
/**
|