@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.
Files changed (110) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/taro-button-core.cjs.entry.js +5 -0
  3. package/dist/cjs/taro-components.cjs.js +1 -1
  4. package/dist/cjs/taro-movable-area-core.cjs.entry.js +1 -1
  5. package/dist/cjs/taro-movable-view-core.cjs.entry.js +18 -43
  6. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +5 -0
  7. package/dist/cjs/taro-video-control_3.cjs.entry.js +98 -181
  8. package/dist/collection/components/button/button.js +11 -0
  9. package/dist/collection/components/movable-area/area.css +2 -2
  10. package/dist/collection/components/movable-area/movable-view.js +18 -33
  11. package/dist/collection/components/swiper/swiper.js +23 -0
  12. package/dist/collection/components/video/video-control.js +22 -39
  13. package/dist/collection/components/video/video-danmu.js +39 -52
  14. package/dist/collection/components/video/video.js +37 -60
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/taro-button-core.entry.js +5 -0
  17. package/dist/esm/taro-components.js +1 -1
  18. package/dist/esm/taro-movable-area-core.entry.js +1 -1
  19. package/dist/esm/taro-movable-view-core.entry.js +18 -43
  20. package/dist/esm/taro-swiper-core_2.entry.js +5 -0
  21. package/dist/esm/taro-video-control_3.entry.js +98 -181
  22. package/dist/esm-es5/loader.js +1 -1
  23. package/dist/esm-es5/taro-button-core.entry.js +1 -1
  24. package/dist/esm-es5/taro-components.js +1 -1
  25. package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
  26. package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
  27. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  28. package/dist/esm-es5/taro-video-control_3.entry.js +55 -55
  29. package/dist/taro-components/p-0380841f.system.js +1 -1
  30. package/dist/taro-components/{p-a94524c9.system.entry.js → p-06b9d39c.system.entry.js} +1 -1
  31. package/dist/taro-components/{p-63a0c6b0.entry.js → p-34178401.entry.js} +1 -1
  32. package/dist/taro-components/p-3549b6d2.entry.js +1 -0
  33. package/dist/taro-components/p-4262d1b6.entry.js +1 -0
  34. package/dist/taro-components/{p-f8b9c4b0.entry.js → p-42630f45.entry.js} +1 -1
  35. package/dist/taro-components/{p-f81a74bb.system.entry.js → p-4c1a7cae.system.entry.js} +81 -81
  36. package/dist/taro-components/{p-3744e978.entry.js → p-99d17a1a.entry.js} +52 -52
  37. package/dist/taro-components/{p-13f0b11f.system.entry.js → p-a5496bf5.system.entry.js} +1 -1
  38. package/dist/taro-components/p-f40e1218.system.entry.js +1 -0
  39. package/dist/taro-components/{p-1c775a11.system.entry.js → p-f5f1c3b7.system.entry.js} +1 -1
  40. package/dist/taro-components/taro-components.esm.js +1 -1
  41. package/dist/types/components/button/button.d.ts +1 -0
  42. package/dist/types/components/swiper/swiper.d.ts +4 -0
  43. package/dist/types/components.d.ts +8 -0
  44. package/package.json +15 -12
  45. package/types/Ad.d.ts +21 -22
  46. package/types/AnimationVideo.d.ts +62 -0
  47. package/types/AnimationView.d.ts +45 -0
  48. package/types/ArCamera.d.ts +50 -0
  49. package/types/Audio.d.ts +6 -6
  50. package/types/AwemeData.d.ts +43 -0
  51. package/types/Button.d.ts +68 -71
  52. package/types/Camera.d.ts +16 -17
  53. package/types/Canvas.d.ts +23 -28
  54. package/types/Checkbox.d.ts +8 -8
  55. package/types/CheckboxGroup.d.ts +1 -1
  56. package/types/CommentDetail.d.ts +72 -0
  57. package/types/CommentList.d.ts +128 -0
  58. package/types/ContactButton.d.ts +53 -0
  59. package/types/CoverImage.d.ts +16 -16
  60. package/types/CoverView.d.ts +105 -7
  61. package/types/CustomWrapper.d.ts +1 -1
  62. package/types/FollowSwan.d.ts +28 -0
  63. package/types/Form.d.ts +11 -11
  64. package/types/Icon.d.ts +1 -1
  65. package/types/Image.d.ts +21 -21
  66. package/types/InlinePaymentPanel.d.ts +58 -0
  67. package/types/Input.d.ts +93 -28
  68. package/types/Lifestyle.d.ts +26 -0
  69. package/types/Like.d.ts +107 -0
  70. package/types/LivePlayer.d.ts +32 -26
  71. package/types/LivePusher.d.ts +6 -6
  72. package/types/Login.d.ts +45 -0
  73. package/types/Lottie.d.ts +113 -0
  74. package/types/Map.d.ts +67 -72
  75. package/types/MatchMedia.d.ts +1 -1
  76. package/types/MovableArea.d.ts +2 -2
  77. package/types/MovableView.d.ts +20 -29
  78. package/types/NativeSlot.d.ts +32 -0
  79. package/types/Navigator.d.ts +11 -11
  80. package/types/OpenData.d.ts +6 -6
  81. package/types/PageContainer.d.ts +31 -24
  82. package/types/PageMeta.d.ts +15 -15
  83. package/types/Picker.d.ts +2 -6
  84. package/types/PickerView.d.ts +12 -22
  85. package/types/Progress.d.ts +6 -6
  86. package/types/Radio.d.ts +1 -1
  87. package/types/RadioGroup.d.ts +6 -6
  88. package/types/RichText.d.ts +17 -17
  89. package/types/RootPortal.d.ts +11 -2
  90. package/types/RtcRoom.d.ts +104 -0
  91. package/types/RtcRoomItem.d.ts +26 -0
  92. package/types/ScrollView.d.ts +47 -31
  93. package/types/ShareElement.d.ts +20 -10
  94. package/types/Slider.d.ts +11 -11
  95. package/types/Slot.d.ts +1 -1
  96. package/types/Swiper.d.ts +32 -20
  97. package/types/SwiperItem.d.ts +3 -2
  98. package/types/Switch.d.ts +6 -6
  99. package/types/TabItem.d.ts +35 -0
  100. package/types/Tabs.d.ts +58 -0
  101. package/types/Text.d.ts +1 -1
  102. package/types/Textarea.d.ts +39 -33
  103. package/types/Video.d.ts +123 -108
  104. package/types/View.d.ts +21 -14
  105. package/types/VoipRoom.d.ts +5 -5
  106. package/types/WebView.d.ts +12 -6
  107. package/types/index.vue3.d.ts +268 -259
  108. package/dist/taro-components/p-6800ac6f.entry.js +0 -1
  109. package/dist/taro-components/p-7f93fa08.entry.js +0 -1
  110. package/dist/taro-components/p-9e1572c5.system.entry.js +0 -1
@@ -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 }
@@ -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 属性后生效) detail { scrollTop, scrollLeft, velocity }
206
+ /** 滑动结束事件 (同时开启 enhanced 属性后生效)
175
207
  * @supported weapp
176
208
  */
177
- onDragend?: CommonEventFunction
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
@@ -246,7 +262,7 @@ declare namespace ScrollViewProps {
246
262
  * H5 中 ScrollView 组件是通过一个高度(或宽度)固定的容器内部滚动来实现的,因此务必正确的设置容器的高度。例如: 如果 ScrollView 的高度将 body 撑开,就会同时存在两个滚动条(body 下的滚动条,以及 ScrollView 的滚动条)。
247
263
  * 微信小程序 中 ScrollView 组件如果设置 scrollX 横向滚动时,并且子元素为多个时(单个子元素时设置固定宽度则可以正常横向滚动),需要通过 WXSS 设置 `white-space: nowrap` 来保证元素不换行,并对 ScrollView 内部元素设置 `display: inline-block` 来使其能够横向滚动。
248
264
  * @classification viewContainer
249
- * @supported weapp, swan, alipay, tt, h5, rn
265
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
250
266
  * @example_react
251
267
  * ```tsx
252
268
  * export default class PageView extends Component {
@@ -1,28 +1,38 @@
1
1
  import { ComponentType } from 'react'
2
2
  import { StandardProps, CommonEventFunction } from './common'
3
3
  interface ShareElementProps extends StandardProps {
4
+ /** 映射标记
5
+ * @supported weapp
6
+ */
7
+ key?: string
8
+
9
+ /** 映射标记
10
+ * @supported weapp
11
+ */
12
+ mapkey?: string
13
+
14
+ /** 映射标记
15
+ * @supported alipay
16
+ */
17
+ name?: string
18
+
4
19
  /** 是否进行动画
5
20
  * @default false
6
- * @supported weapp
21
+ * @supported weapp, alipay
7
22
  */
8
23
  transform?: boolean
9
24
 
10
25
  /** 动画时长,单位毫秒
11
26
  * @default 300
12
- * @supported weapp
27
+ * @supported weapp, alipay
13
28
  */
14
29
  duration?: number
15
30
 
16
31
  /** css缓动函数
17
32
  * @default ease-out
18
- * @supported weapp
33
+ * @supported weapp, alipay
19
34
  */
20
- easingFunction?: number
21
-
22
- /** 映射标记
23
- * @supported weapp
24
- */
25
- key?: string
35
+ easingFunction?: string
26
36
  }
27
37
 
28
38
  /** 共享元素
@@ -30,7 +40,7 @@ interface ShareElementProps extends StandardProps {
30
40
  * 共享元素是一种动画形式,类似于 [`flutter Hero`](https://flutterchina.club/animations/hero-animations/) 动画,表现为元素像是在页面间穿越一样。该组件需与 [`PageContainer`](/docs/components/viewContainer/page-container) 组件结合使用。
31
41
  * 使用时需在当前页放置 `ShareElement` 组件,同时在 `PageContainer` 容器中放置对应的 `ShareElement` 组件,对应关系通过属性值 key 映射。当设置 `PageContainer` `显示时,transform` 属性为 `true` 的共享元素会产生动画。当前页面容器退出时,会产生返回动画。
32
42
  * @classification viewContainer
33
- * @supported weapp
43
+ * @supported weapp, alipay
34
44
  * @example_react
35
45
  * ```tsx
36
46
  * // index.js
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 {
@@ -118,7 +118,7 @@ declare namespace SliderProps {
118
118
 
119
119
  /** 滑动选择器
120
120
  * @classification forms
121
- * @supported weapp, h5, rn, swan, alipay, tt
121
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
122
122
  * @example_react
123
123
  * ```tsx
124
124
  * export default class PageView extends Component {
package/types/Slot.d.ts CHANGED
@@ -5,7 +5,7 @@ interface SlotProps {
5
5
  * @default none
6
6
  * @supported weapp, swan, alipay, tt, jd, qq
7
7
  */
8
- name?: string,
8
+ name?: string
9
9
  /** scoped slot 传入数据源
10
10
  * @default none
11
11
  * @supported swan
package/types/Swiper.d.ts CHANGED
@@ -97,26 +97,23 @@ interface SwiperProps extends StandardProps {
97
97
  */
98
98
  easingFunction?: keyof SwiperProps.TEasingFunction
99
99
 
100
- /** current 改变时会触发 change 事件
101
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
102
- */
103
- onChange?: CommonEventFunction<SwiperProps.onChangeEventDetail>
104
-
105
- /** swiper-item 的位置发生改变时会触发 transition 事件
106
- * @supported weapp, alipay, tt, qq, jd
100
+ /** 是否禁止用户 touch 操作
101
+ * @default false
102
+ * @supported alipay
107
103
  */
108
- onTransition?: CommonEventFunction<SwiperProps.onTransitionEventDetail>
104
+ disableTouch?: boolean
109
105
 
110
- /** 动画结束时会触发 animationfinish 事件
111
- * @supported weapp, swan, tt, qq, jd, h5, rn
106
+ /** 是否启用缩放
107
+ * @default false
108
+ * @supported h5
112
109
  */
113
- onAnimationFinish?: SwiperProps['onChange']
110
+ zoom?: boolean
114
111
 
115
- /** 是否禁止用户 touch 操作
112
+ /** 是否开启全屏
116
113
  * @default false
117
- * @supported alipay
114
+ * @supported h5
118
115
  */
119
- disableTouch?: boolean
116
+ full?: boolean
120
117
 
121
118
  /** swiper-item 可见时的 class。
122
119
  * @supported alipay
@@ -140,11 +137,6 @@ interface SwiperProps extends StandardProps {
140
137
  */
141
138
  disableProgrammaticAnimation?: string
142
139
 
143
- /** 动画结束时会触发 animationEnd 事件
144
- * @supported alipay
145
- */
146
- onAnimationEnd?: CommonEventFunction<SwiperProps.onCommonEventDetail>
147
-
148
140
  /** 滑动距离阈值,当滑动距离超过阈值时进行 swiper-item 切换。
149
141
  * @supported alipay
150
142
  */
@@ -175,6 +167,26 @@ interface SwiperProps extends StandardProps {
175
167
  * @supported swan
176
168
  */
177
169
  disableTouchmove?: string
170
+
171
+ /** current 改变时会触发 change 事件
172
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
173
+ */
174
+ onChange?: CommonEventFunction<SwiperProps.onChangeEventDetail>
175
+
176
+ /** swiper-item 的位置发生改变时会触发 transition 事件
177
+ * @supported weapp, alipay, tt, qq, jd
178
+ */
179
+ onTransition?: CommonEventFunction<SwiperProps.onTransitionEventDetail>
180
+
181
+ /** 动画结束时会触发 animationfinish 事件
182
+ * @supported weapp, swan, tt, qq, jd, h5, rn
183
+ */
184
+ onAnimationFinish?: SwiperProps['onChange']
185
+
186
+ /** 动画结束时会触发 animationEnd 事件
187
+ * @supported alipay
188
+ */
189
+ onAnimationEnd?: CommonEventFunction<SwiperProps.onCommonEventDetail>
178
190
  }
179
191
  declare namespace SwiperProps {
180
192
  /** 导致变更的原因 */
@@ -235,7 +247,7 @@ declare namespace SwiperProps {
235
247
  /** 滑块视图容器。其中只可放置 swiper-item 组件,否则会导致未定义的行为。
236
248
  * > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147)
237
249
  * @classification viewContainer
238
- * @supported weapp, swan, alipay, tt, h5, rn
250
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
239
251
  * @example_react
240
252
  * ```tsx
241
253
  * class App extends Component {
@@ -7,15 +7,16 @@ interface SwiperItemProps extends StandardProps {
7
7
  itemId?: string
8
8
 
9
9
  /** 是否跳过未显示的滑块布局,设为 true 可优化复杂情况下的滑动性能,但会丢失隐藏状态滑块的布局信息
10
+ * @default false
10
11
  * @supported weapp
11
12
  */
12
- skipHiddenItemLayout?: string
13
+ skipHiddenItemLayout?: boolean
13
14
  }
14
15
 
15
16
  /** 仅可放置在 swiper 组件中,宽高自动设置为100%
16
17
  * > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147)
17
18
  * @classification viewContainer
18
- * @supported weapp, swan, alipay, tt, h5, rn
19
+ * @supported weapp, alipay, swan, tt, jd, h5, rn
19
20
  * @example_react
20
21
  * ```tsx
21
22
  * class App extends Component {
package/types/Switch.d.ts CHANGED
@@ -25,11 +25,6 @@ interface SwitchProps extends StandardProps, FormItemProps {
25
25
  */
26
26
  color?: string
27
27
 
28
- /** checked 改变时触发 change 事件
29
- * @supported weapp, alipay, swan, tt, qq, jd, rn
30
- */
31
- onChange?: CommonEventFunction<SwitchProps.onChangeEventDetail>
32
-
33
28
  /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
34
29
  * @supported h5
35
30
  */
@@ -50,6 +45,11 @@ interface SwitchProps extends StandardProps, FormItemProps {
50
45
  * @supported qq
51
46
  */
52
47
  ariaLabel?: string
48
+
49
+ /** checked 改变时触发 change 事件
50
+ * @supported weapp, alipay, swan, tt, qq, jd, rn
51
+ */
52
+ onChange?: CommonEventFunction<SwitchProps.onChangeEventDetail>
53
53
  }
54
54
  declare namespace SwitchProps {
55
55
  interface onChangeEventDetail {
@@ -93,7 +93,7 @@ declare namespace SwitchProps {
93
93
  * </view>
94
94
  * </template>
95
95
  * ```
96
- * @supported weapp, h5, rn, swan, alipay, tt
96
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
97
97
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/switch.html
98
98
  */
99
99
  declare const Switch: ComponentType<SwitchProps>
@@ -0,0 +1,35 @@
1
+ import { ComponentType } from 'react'
2
+ import { StandardProps } from './common'
3
+ interface TabItemProps extends StandardProps {
4
+ /** tab-item 内显示的文字
5
+ * @supported swan
6
+ * @default 无
7
+ */
8
+ label?: string
9
+
10
+ /** tab-item 对应的 name 值
11
+ * @supported swan
12
+ * @default 无
13
+ */
14
+ name?: string
15
+
16
+ /** 徽标类型 badge-type 分为圆点“dot”和文本“text”,不设置 badge-type 则不显示徽标
17
+ * @supported swan
18
+ * @default 无
19
+ */
20
+ badgeType?: string
21
+
22
+ /** badge-type 为 text 的时候,徽标内的数字,为空时badge-type="text"不生效
23
+ * @supported swan
24
+ * @default 无
25
+ */
26
+ badgeText?: string
27
+ }
28
+
29
+ /** 标签栏子项
30
+ * @classification navig
31
+ * @supported swan
32
+ * @see https://smartprogram.baidu.com/docs/develop/component/tab-item/
33
+ */
34
+ declare const TabItem: ComponentType<TabItemProps>
35
+ export { TabItem, TabItemProps }
@@ -0,0 +1,58 @@
1
+ import { ComponentType } from 'react'
2
+ import { StandardProps } from './common'
3
+ interface TabsProps extends StandardProps {
4
+ /** tabs 背景色,必须填写十六进制颜色
5
+ * @supported swan
6
+ * @default "#fff"
7
+ */
8
+ tabsBackgroundColor?: string
9
+
10
+ /** tabs 激活 tab-item 文字颜色
11
+ * @supported swan
12
+ * @default "#000"
13
+ */
14
+ tabsActiveTextColor?: string
15
+
16
+ /** tabs 非激活 tab-item 文字颜色
17
+ * @supported swan
18
+ * @default "#666"
19
+ */
20
+ tabsInactiveTextColor?: string
21
+
22
+ /** tabs 激活 tab-item 下划线颜色
23
+ * @supported swan
24
+ * @default "#333"
25
+ */
26
+ tabsUnderlineColor?: string
27
+
28
+ /** 仅用于普通标签栏组件,当前激活 tab-item 的对应的 name 值,须搭配 bindtabchange 一起使用。
29
+ * @supported swan
30
+ * @default 无
31
+ */
32
+ activeName?: string
33
+
34
+ /** 仅用于可寻址标签栏组件,当前 tab 所改变的 url query 中参数 key,需要通过 tabs 修改页面 url 的时候设置。
35
+ * @supported swan
36
+ * @default 无
37
+ */
38
+ urlQueryName?: string
39
+
40
+ /** 当前 tabs 视图中最多容纳的 tab-item 数量,低于此数量均分排列,超出此数量划屏。默认五个,开发者可根据业务需求调整
41
+ * @supported swan
42
+ * @default 5
43
+ */
44
+ maxTabItemAmount?: number
45
+
46
+ /** tab 被点击的回调,可以在 e.detail.name 中取到当前点击的 tab-item 对应的 name 值
47
+ * @supported swan
48
+ */
49
+ onTabChange?: CommonEventFunction
50
+ }
51
+
52
+ /** 标签栏
53
+ * @classification navig
54
+ * @supported swan
55
+ * @see https://smartprogram.baidu.com/docs/develop/component/tabs/
56
+ */
57
+ declare const Tabs: ComponentType<TabsProps>
58
+ export { Tabs, TabsProps }
package/types/Text.d.ts CHANGED
@@ -45,7 +45,7 @@ declare namespace TextProps {
45
45
 
46
46
  /** 文本
47
47
  * @classification base
48
- * @supported weapp, swan, alipay, tt, h5, rn
48
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
49
49
  * @example_react
50
50
  * ```tsx
51
51
  * export default class PageView extends Component {