@tarojs/components 3.6.0-canary.5 → 3.6.0-canary.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.
Files changed (64) hide show
  1. package/dist/react/component-lib/input.js +2 -2
  2. package/dist/react/component-lib/reactify-wc.js +13 -13
  3. package/dist/react/helper.js +1 -1
  4. package/dist/react/react-component-lib/createComponent.js +10 -10
  5. package/dist/react/react-component-lib/createOverlayComponent.js +18 -16
  6. package/dist/react/react-component-lib/utils/attachProps.js +1 -1
  7. package/dist/react/react-component-lib/utils/index.js +7 -6
  8. package/dist/vue2/component-lib/createComponent.js +1 -1
  9. package/dist/vue2/component-lib/createFormsComponent.js +2 -2
  10. package/dist/vue2/component-lib/index.js +1 -1
  11. package/dist/vue2/component-lib/mixins/listeners.js +1 -1
  12. package/dist/vue2/component-lib/mixins/refs.js +1 -1
  13. package/dist/vue2/component-lib/picker.js +1 -1
  14. package/dist/vue2/component-lib/scroll-view.js +1 -1
  15. package/dist/vue2/components.js +1 -1
  16. package/dist/vue2/index.js +2 -2
  17. package/dist/vue2/vue-component-lib/utils.js +2 -2
  18. package/dist/vue3/component-lib/createComponent.js +1 -1
  19. package/dist/vue3/component-lib/createFormsComponent.js +3 -3
  20. package/dist/vue3/index.js +1 -1
  21. package/dist/vue3/vue-component-lib/utils.js +3 -3
  22. package/package.json +4 -4
  23. package/types/Ad.d.ts +1 -1
  24. package/types/Audio.d.ts +1 -1
  25. package/types/Button.d.ts +1 -1
  26. package/types/Camera.d.ts +1 -1
  27. package/types/Canvas.d.ts +1 -1
  28. package/types/Checkbox.d.ts +1 -1
  29. package/types/CheckboxGroup.d.ts +1 -1
  30. package/types/CoverImage.d.ts +1 -1
  31. package/types/CoverView.d.ts +102 -4
  32. package/types/CustomWrapper.d.ts +1 -1
  33. package/types/Form.d.ts +1 -1
  34. package/types/Icon.d.ts +1 -1
  35. package/types/Image.d.ts +1 -1
  36. package/types/Input.d.ts +71 -8
  37. package/types/LivePlayer.d.ts +1 -1
  38. package/types/LivePusher.d.ts +1 -1
  39. package/types/Map.d.ts +1 -1
  40. package/types/MatchMedia.d.ts +1 -1
  41. package/types/MovableArea.d.ts +2 -2
  42. package/types/MovableView.d.ts +17 -17
  43. package/types/Navigator.d.ts +1 -1
  44. package/types/OpenData.d.ts +1 -1
  45. package/types/PageContainer.d.ts +28 -18
  46. package/types/PageMeta.d.ts +1 -1
  47. package/types/Picker.d.ts +1 -1
  48. package/types/PickerView.d.ts +1 -1
  49. package/types/Progress.d.ts +1 -1
  50. package/types/Radio.d.ts +1 -1
  51. package/types/RadioGroup.d.ts +1 -1
  52. package/types/RootPortal.d.ts +11 -2
  53. package/types/ScrollView.d.ts +1 -1
  54. package/types/ShareElement.d.ts +20 -10
  55. package/types/Slider.d.ts +1 -1
  56. package/types/Swiper.d.ts +1 -1
  57. package/types/SwiperItem.d.ts +3 -2
  58. package/types/Switch.d.ts +1 -1
  59. package/types/Text.d.ts +1 -1
  60. package/types/Textarea.d.ts +7 -1
  61. package/types/Video.d.ts +7 -1
  62. package/types/View.d.ts +1 -1
  63. package/types/WebView.d.ts +1 -1
  64. package/types/index.vue3.d.ts +2 -1
package/types/Input.d.ts CHANGED
@@ -9,11 +9,11 @@ interface InputProps extends StandardProps, FormItemProps {
9
9
  /** input 的类型
10
10
  * @default "text"
11
11
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
12
- * @rn 部分支持
13
12
  */
14
- type?: 'text' | 'number' | 'idcard' | 'digit' | 'safe-password' | 'nickname'
13
+ type?: keyof InputProps.Type
15
14
 
16
15
  /** 是否是密码类型
16
+ * @default false
17
17
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
18
18
  */
19
19
  password?: boolean
@@ -40,6 +40,7 @@ interface InputProps extends StandardProps, FormItemProps {
40
40
  placeholderTextColor?: string
41
41
 
42
42
  /** 是否禁用
43
+ * @default false
43
44
  * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
44
45
  */
45
46
  disabled?: boolean
@@ -69,11 +70,12 @@ interface InputProps extends StandardProps, FormItemProps {
69
70
  */
70
71
  focus?: boolean
71
72
 
72
- /** 设置键盘右下角按钮的文字
73
+ /** 设置键盘右下角按钮的文字,仅在type='text'时生效
74
+ * @alipay confirm-type 与 enableNative 属性冲突,若希望 confirm-type 生效,enableNative 不能设定为 false,而且不能设定 always-system
73
75
  * @default done
74
76
  * @supported weapp, alipay, swan, tt, qq, jd, rn
75
77
  */
76
- confirmType?: 'send' | 'search' | 'next' | 'go' | 'done'
78
+ confirmType?: keyof InputProps.ConfirmType
77
79
 
78
80
  /** 点击键盘右下角按钮时是否保持键盘不收起
79
81
  * @default false
@@ -99,7 +101,7 @@ interface InputProps extends StandardProps, FormItemProps {
99
101
  selectionEnd?: number
100
102
 
101
103
  /** 键盘弹起时,是否自动上推页面
102
- * @default false
104
+ * @default true
103
105
  * @supported weapp, swan, tt, qq, jd
104
106
  */
105
107
  adjustPosition?: boolean
@@ -161,7 +163,9 @@ interface InputProps extends StandardProps, FormItemProps {
161
163
  randomNumber?: boolean
162
164
 
163
165
  /**
164
- * 是否为受控组件
166
+ * 是否为受控组件。为 true 时,value 内容会完全受 setData 控制。
167
+ *
168
+ * 建议当 type 值为 text 时不要将 controlled 设置为 true,详见 [Bugs & Tips](https://opendocs.alipay.com/mini/component/input#Bug%20%26%20Tip)
165
169
  * @default false
166
170
  * @supported alipay
167
171
  */
@@ -178,9 +182,16 @@ interface InputProps extends StandardProps, FormItemProps {
178
182
  name?: string
179
183
 
180
184
  /** 是否强制使用系统键盘和 Web-view 创建的 input 元素。为 true 时,confirm-type、confirm-hold 可能失效。
185
+ * @default false
181
186
  * @supported alipay
182
187
  */
183
- alwaysSystem?: string
188
+ alwaysSystem?: boolean
189
+
190
+ /** 使用原生键盘
191
+ * @default true
192
+ * @supported alipay
193
+ */
194
+ enableNative?: boolean
184
195
 
185
196
  /** 无障碍访问,(属性)元素的额外描述
186
197
  * @supported qq
@@ -214,6 +225,58 @@ interface InputProps extends StandardProps, FormItemProps {
214
225
  onKeyboardHeightChange?: CommonEventFunction<InputProps.onKeyboardHeightChangeEventDetail>
215
226
  }
216
227
  declare namespace InputProps {
228
+ /** Input 类型 */
229
+ interface Type {
230
+ /** 文本输入键盘
231
+ * @supported weapp, alipay, h5, rn
232
+ */
233
+ text
234
+ /** 数字输入键盘
235
+ * @supported weapp, alipay, h5, rn
236
+ */
237
+ number
238
+ /** 身份证输入键盘
239
+ *@supported weapp, alipay, rn
240
+ */
241
+ idcard
242
+ /** 带小数点的数字键盘
243
+ * @supported weapp, alipay, h5, rn
244
+ */
245
+ digit
246
+ /** 密码安全输入键盘[指引](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/safe-password.html)
247
+ * @supported weapp, alipay
248
+ */
249
+ 'safe-password'
250
+ /** 昵称输入键盘
251
+ * @supported weapp, alipay
252
+ */
253
+ nickname
254
+ /** 数字输入键盘
255
+ * @supported alipay
256
+ */
257
+ numberpad
258
+ /** 带小数点的数字键盘
259
+ * @supported alipay
260
+ */
261
+ digitpad
262
+ /** 身份证输入键盘
263
+ * @supported alipay
264
+ */
265
+ idcardpad
266
+ }
267
+ /** Confirm 类型 */
268
+ interface ConfirmType {
269
+ /** 右下角按钮为“发送” */
270
+ send
271
+ /** 右下角按钮为“搜索” */
272
+ search
273
+ /** 右下角按钮为“下一个” */
274
+ next
275
+ /** 右下角按钮为“前往” */
276
+ go
277
+ /** 右下角按钮为“完成” */
278
+ done
279
+ }
217
280
  /** > 注意:React-Native 端 `inputEventDetail` 仅实现参数 `value`,若需实时获取光标位置则可通过 [`onSelectionChange`](https://reactnative.dev/docs/textinput#onselectionchange) 实现。 */
218
281
  interface inputEventDetail {
219
282
  /** 输入值 */
@@ -247,7 +310,7 @@ declare namespace InputProps {
247
310
 
248
311
  /** 输入框。该组件是原生组件,使用时请注意相关限制
249
312
  * @classification forms
250
- * @supported weapp, h5, rn
313
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
251
314
  * @example_react
252
315
  * ```tsx
253
316
  * class App extends Component {
@@ -271,7 +271,7 @@ declare namespace LivePlayerProps {
271
271
  *
272
272
  * 需要先通过类目审核,再在小程序管理后台,“设置”-“接口设置”中自助开通该组件权限。
273
273
  * @classification media
274
- * @supported weapp, tt
274
+ * @supported weapp, swan, tt, qq, jd
275
275
  * @example_react
276
276
  * ```tsx
277
277
  * class App extends Components {
@@ -365,7 +365,7 @@ declare namespace LivePusherProps {
365
365
  /** 实时音视频录制。需要用户授权 scope.camera、scope.record
366
366
  * 需要先通过类目审核,再在小程序管理后台,「开发」-「接口设置」中自助开通该组件权限。
367
367
  * @classification media
368
- * @supported weapp
368
+ * @supported weapp, qq
369
369
  * @example_react
370
370
  * ```tsx
371
371
  * class App extends Components {
package/types/Map.d.ts CHANGED
@@ -661,7 +661,7 @@ declare namespace MapProps {
661
661
 
662
662
  /** 地图。相关api Taro.createMapContext。
663
663
  * @classification maps
664
- * @supported weapp, alipay, swan
664
+ * @supported weapp, alipay, swan, tt, qq, jd
665
665
  * @example_react
666
666
  * ```tsx
667
667
  * class App extends Component {
@@ -39,7 +39,7 @@ interface MatchMediaProps extends StandardProps {
39
39
 
40
40
  /** media query 匹配检测节点。可以指定一组 media query 规则,满足时,这个节点才会被展示。
41
41
  * 通过这个节点可以实现“页面宽高在某个范围时才展示某个区域”这样的效果。
42
- * @supported weapp
42
+ * @supported weapp, alipay
43
43
  * @classification viewContainer
44
44
  * @example_react
45
45
  * ```tsx
@@ -3,14 +3,14 @@ import { StandardProps } from './common'
3
3
  interface MovableAreaProps extends StandardProps {
4
4
  /** 当里面的 movable-view 设置为支持双指缩放时,设置此值可将缩放手势生效区域修改为整个 movable-area
5
5
  * @default false
6
- * @supported weapp, alipay, swan, tt, qq
6
+ * @supported weapp, alipay, swan, tt, qq, h5
7
7
  */
8
8
  scaleArea?: boolean
9
9
  }
10
10
 
11
11
  /** movable-view 的可移动区域
12
12
  * @classification viewContainer
13
- * @supported weapp, rn
13
+ * @supported weapp, alipay, swan, tt, qq, h5, rn
14
14
  * @example_react
15
15
  * ```tsx
16
16
  * class App extends Components {
@@ -3,77 +3,77 @@ import { StandardProps, CommonEventFunction, TouchEventFunction } from './common
3
3
  interface MovableViewProps extends Omit<StandardProps, 'animation'> {
4
4
  /** movable-view 的移动方向,属性值有`all`、`vertical`、`horizontal`、`none`
5
5
  * @default none
6
- * @supported weapp, alipay, swan, tt, qq, rn
6
+ * @supported weapp, alipay, swan, tt, qq, h5, rn
7
7
  */
8
8
  direction?: 'all' | 'vertical' | 'horizontal' | 'none'
9
9
 
10
10
  /** movable-view 是否带有惯性
11
11
  * @default false
12
- * @supported weapp, alipay, swan, tt, qq
12
+ * @supported weapp, alipay, swan, tt, qq, h5
13
13
  */
14
14
  inertia?: boolean
15
15
 
16
16
  /** 超过可移动区域后,movable-view 是否还可以移动
17
17
  * @default false
18
- * @supported weapp, alipay, swan, tt, qq
18
+ * @supported weapp, alipay, swan, tt, qq, h5
19
19
  */
20
20
  outOfBounds?: boolean
21
21
 
22
22
  /** 定义 x 轴方向的偏移,如果 x 的值不在可移动范围内,会自动移动到可移动范围;改变 x 的值会触发动画
23
- * @supported weapp, alipay, swan, tt, qq, rn
23
+ * @supported weapp, alipay, swan, tt, qq, h5, rn
24
24
  */
25
25
  x?: number | string
26
26
 
27
27
  /** 定义 y 轴方向的偏移,如果 y 的值不在可移动范围内,会自动移动到可移动范围;改变 y 的值会触发动画
28
- * @supported weapp, alipay, swan, tt, qq, rn
28
+ * @supported weapp, alipay, swan, tt, qq, h5, rn
29
29
  */
30
30
  y?: number | string
31
31
 
32
32
  /** 阻尼系数,用于控制x或y改变时的动画和过界回弹的动画,值越大移动越快
33
33
  * @default 20
34
- * @supported weapp, alipay, swan, tt, qq
34
+ * @supported weapp, alipay, swan, tt, qq, h5
35
35
  */
36
36
  damping?: number
37
37
 
38
38
  /** 摩擦系数,用于控制惯性滑动的动画,值越大摩擦力越大,滑动越快停止;必须大于 0,否则会被设置成默认值
39
39
  * @default 2
40
- * @supported weapp, alipay, swan, tt, qq
40
+ * @supported weapp, alipay, swan, tt, qq, h5
41
41
  */
42
42
  friction?: number
43
43
 
44
44
  /** 是否禁用
45
45
  * @default false
46
- * @supported weapp, alipay, swan, tt, qq, rn
46
+ * @supported weapp, alipay, swan, tt, qq, h5, rn
47
47
  */
48
48
  disabled?: boolean
49
49
 
50
50
  /** 是否支持双指缩放,默认缩放手势生效区域是在 movable-view 内
51
51
  * @default false
52
- * @supported weapp, alipay, swan, tt, qq
52
+ * @supported weapp, alipay, swan, tt, qq, h5
53
53
  */
54
54
  scale?: boolean
55
55
 
56
56
  /** 定义缩放倍数最小值
57
57
  * @default 0.5
58
- * @supported weapp, alipay, swan, tt, qq
58
+ * @supported weapp, alipay, swan, tt, qq, h5
59
59
  */
60
60
  scaleMin?: number
61
61
 
62
62
  /** 定义缩放倍数最大值
63
63
  * @default 10
64
- * @supported weapp, alipay, swan, tt, qq
64
+ * @supported weapp, alipay, swan, tt, qq, h5
65
65
  */
66
66
  scaleMax?: number
67
67
 
68
68
  /** 定义缩放倍数,取值范围为 0.5 - 10
69
69
  * @default 1
70
- * @supported weapp, alipay, swan, tt, qq
70
+ * @supported weapp, alipay, swan, tt, qq, h5
71
71
  */
72
72
  scaleValue?: number
73
73
 
74
74
  /** 是否使用动画
75
75
  * @default true
76
- * @supported weapp, alipay, swan, tt, qq
76
+ * @supported weapp, alipay, swan, tt, qq, h5
77
77
  */
78
78
  animation?: boolean
79
79
 
@@ -98,7 +98,7 @@ interface MovableViewProps extends Omit<StandardProps, 'animation'> {
98
98
  onDragEnd?: CommonEventFunction
99
99
 
100
100
  /** 缩放过程中触发的事件
101
- * @supported weapp, alipay, swan, tt, qq
101
+ * @supported weapp, alipay, swan, tt, qq, h5
102
102
  */
103
103
  onScale?: CommonEventFunction<MovableViewProps.onScaleEventDetail>
104
104
 
@@ -124,12 +124,12 @@ interface MovableViewProps extends Omit<StandardProps, 'animation'> {
124
124
  onTouchCancel?: CommonEventFunction
125
125
 
126
126
  /** 初次手指触摸后移动为横向的移动,如果 catch 此事件,则意味着 touchmove 事件也被 catch
127
- * @supported weapp, swan, tt
127
+ * @supported weapp, swan, tt, h5
128
128
  */
129
129
  onHTouchMove?: TouchEventFunction
130
130
 
131
131
  /** 初次手指触摸后移动为纵向的移动,如果 catch 此事件,则意味着 touchmove 事件也被 catch
132
- * @supported weapp, swan, tt
132
+ * @supported weapp, swan, tt, h5
133
133
  */
134
134
  onVTouchMove?: TouchEventFunction
135
135
 
@@ -190,7 +190,7 @@ declare namespace MovableViewProps {
190
190
 
191
191
  /** 可移动的视图容器,在页面中可以拖拽滑动。movable-view 必须在 movable-area 组件中,并且必须是直接子节点,否则不能移动。
192
192
  * @classification viewContainer
193
- * @supported weapp, swan, alipay, rn, tt
193
+ * @supported weapp, alipay, swan, tt, qq, h5, rn
194
194
  * @example_react
195
195
  * ```tsx
196
196
  * class App extends Components {
@@ -138,7 +138,7 @@ declare namespace NavigatorProps {
138
138
 
139
139
  /** 页面链接
140
140
  * @classification navig
141
- * @supported weapp, swan, alipay, tt
141
+ * @supported weapp, alipay, swan, tt, qq, jd
142
142
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html
143
143
  */
144
144
  declare const Navigator: ComponentType<NavigatorProps>
@@ -95,7 +95,7 @@ declare namespace OpenDataProps {
95
95
 
96
96
  /** 用于展示平台开放的数据
97
97
  * @classification open
98
- * @supported weapp, tt
98
+ * @supported weapp, swan, tt, qq
99
99
  * @example_react
100
100
  * ```tsx
101
101
  * class App extends Component {
@@ -3,90 +3,100 @@ import { StandardProps, CommonEventFunction } from './common'
3
3
  interface PageContainerProps extends StandardProps {
4
4
  /** 是否显示容器组件
5
5
  * @default false
6
- * @supported weapp, rn
6
+ * @supported weapp, alipay, rn
7
7
  */
8
8
  show?: boolean
9
9
 
10
10
  /** 动画时长,单位毫秒
11
11
  * @default 300
12
- * @supported weapp, rn
12
+ * @supported weapp, alipay, rn
13
13
  */
14
14
  duration?: number
15
15
 
16
16
  /** z-index 层级
17
17
  * @default 100
18
- * @supported weapp
18
+ * @supported weapp, alipay
19
19
  */
20
20
  zIndex?: number
21
21
 
22
22
  /** 是否显示遮罩层
23
23
  * @default true
24
- * @supported weapp, rn
24
+ * @supported weapp, alipay, rn
25
25
  */
26
26
  overlay?: boolean
27
27
 
28
28
  /** 弹出位置,可选值为 top bottom right center
29
29
  * @default bottom
30
- * @supported weapp, rn
30
+ * @supported weapp, alipay, rn
31
31
  */
32
32
  position?: keyof PageContainerProps.Position
33
33
 
34
34
  /** 是否显示圆角
35
35
  * @default false
36
- * @supported weapp, rn
36
+ * @supported weapp, alipay, rn
37
37
  */
38
38
  round?: boolean
39
39
 
40
40
  /** 自定义遮罩层样式
41
- * @supported weapp, rn
41
+ * @supported weapp, alipay, rn
42
42
  */
43
43
  overlayStyle?: string
44
44
 
45
45
  /** 自定义弹出层样式
46
- * @supported weapp, rn
46
+ * @supported weapp, alipay, rn
47
47
  */
48
48
  customStyle?: string
49
49
 
50
50
  /** 是否在下滑一段距离后关闭
51
- * @supported weapp
51
+ * @supported weapp, alipay
52
52
  * @default false
53
53
  */
54
- closeOnSlideDown?: string
54
+ closeOnSlideDown?: boolean
55
55
 
56
56
  /** 进入前触发
57
- * @supported weapp, rn
57
+ * @supported weapp, alipay, rn
58
58
  */
59
59
  onBeforeEnter?: CommonEventFunction
60
60
 
61
61
  /** 进入中触发
62
- * @supported weapp, rn
62
+ * @supported weapp, alipay, rn
63
63
  */
64
64
  onEnter?: CommonEventFunction
65
65
 
66
66
  /** 进入后触发
67
- * @supported weapp, rn
67
+ * @supported weapp, alipay, rn
68
68
  */
69
69
  onAfterEnter?: CommonEventFunction
70
70
 
71
71
  /** 离开前触发
72
- * @supported weapp, rn
72
+ * @supported weapp, alipay, rn
73
73
  */
74
74
  onBeforeLeave?: CommonEventFunction
75
75
 
76
76
  /** 离开中触发
77
- * @supported weapp, rn
77
+ * @supported weapp, alipay, rn
78
78
  */
79
79
  onLeave?: CommonEventFunction
80
80
 
81
81
  /** 离开后触发
82
- * @supported weapp, rn
82
+ * @supported weapp, alipay, rn
83
83
  */
84
84
  onAfterLeave?: CommonEventFunction
85
85
 
86
86
  /** 点击遮罩层时触发
87
- * @supported weapp
87
+ * @supported weapp, alipay
88
88
  */
89
89
  onClickOverlay?: CommonEventFunction
90
+
91
+ /** 进入被打断时触发(通过 a: if 打断时不会触发)。
92
+ * @supported alipay
93
+ */
94
+ onEnterCancelled?: CommonEventFunction
95
+
96
+ /** 离开被打断时触发(通过 a: if 打断时不会触发)。
97
+ * @supported alipay
98
+ */
99
+ onLeaveCancelled?: CommonEventFunction
90
100
  }
91
101
  declare namespace PageContainerProps {
92
102
  /** 弹出位置 */
@@ -114,7 +124,7 @@ declare namespace PageContainerProps {
114
124
  * 1. tip: 当前页面最多只有 1 个容器,若已存在容器的情况下,无法增加新的容器
115
125
  * 2. tip: wx.navigateBack 无法在页面栈顶调用,此时没有上一级页面
116
126
  * @classification viewContainer
117
- * @supported weapp, rn
127
+ * @supported weapp, alipay, rn
118
128
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/page-container.html
119
129
  */
120
130
  declare const PageContainer: ComponentType<PageContainerProps>
@@ -96,7 +96,7 @@ declare namespace PageMetaProps {
96
96
 
97
97
  /** 页面属性配置节点,用于指定页面的一些属性、监听页面事件。只能是页面内的第一个节点。可以配合 navigation-bar 组件一同使用。
98
98
  * 通过这个节点可以获得类似于调用 Taro.setBackgroundTextStyle Taro.setBackgroundColor 等接口调用的效果。
99
- * @supported weapp
99
+ * @supported weapp, alipay
100
100
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/page-meta.html
101
101
  */
102
102
  declare const PageMeta: ComponentType<PageMetaProps>
package/types/Picker.d.ts CHANGED
@@ -302,7 +302,7 @@ declare namespace PickerRegionProps {
302
302
  /**
303
303
  * 从底部弹起的滚动选择器
304
304
  * @classification forms
305
- * @supported weapp, h5, rn, swan, alipay, tt
305
+ * @supported weapp, swan, alipay, tt, h5, rn
306
306
  * @example_react
307
307
  * ```tsx
308
308
  * export default class PagePicker extends Component {
@@ -66,7 +66,7 @@ declare namespace PickerViewProps {
66
66
  /** 嵌入页面的滚动选择器
67
67
  * 其中只可放置 picker-view-column 组件,其它节点不会显示
68
68
  * @classification forms
69
- * @supported weapp, swan, alipay, tt, h5, rn
69
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
70
70
  * @example_react
71
71
  * ```tsx
72
72
  * export default class Picks extends Component {
@@ -81,7 +81,7 @@ interface ProgressProps extends StandardProps {
81
81
 
82
82
  /** 进度条。组件属性的长度单位默认为 px
83
83
  * @classification base
84
- * @supported weapp, swan, alipay, tt, h5, rn
84
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
85
85
  * @example_react
86
86
  * ```tsx
87
87
  * export default class PageView extends Component {
package/types/Radio.d.ts CHANGED
@@ -44,7 +44,7 @@ interface RadioProps extends StandardProps {
44
44
 
45
45
  /** 单选项目
46
46
  * @classification forms
47
- * @supported weapp, h5, rn, tt
47
+ * @supported weapp, alipay, swan, tt, qq, h5, rn
48
48
  * @example_react
49
49
  * ```tsx
50
50
  * export default class PageRadio extends Component {
@@ -19,7 +19,7 @@ declare namespace RadioGroupProps {
19
19
 
20
20
  /** 单项选择器,内部由多个 Radio 组成。
21
21
  * @classification forms
22
- * @supported weapp, h5, rn, tt
22
+ * @supported weapp, alipay, swan, tt, qq, h5, rn
23
23
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/radio-group.html
24
24
  */
25
25
  declare const RadioGroup: ComponentType<RadioGroupProps>
@@ -1,4 +1,13 @@
1
1
  import { ComponentType } from 'react'
2
+ import { StandardProps } from './common'
3
+ interface RootPortalProps extends StandardProps {
4
+ /**
5
+ * 是否从页面中脱离出来
6
+ * @supported weapp
7
+ * @default true
8
+ */
9
+ enable?: boolean
10
+ }
2
11
 
3
12
  /** root-portal
4
13
  * 使整个子树从页面中脱离出来,类似于在 CSS 中使用 fixed position 的效果。主要用于制作弹窗、弹出层等。
@@ -28,6 +37,6 @@ import { ComponentType } from 'react'
28
37
  * }
29
38
  * ```
30
39
  */
31
- declare const RootPortal: ComponentType
40
+ declare const RootPortal: ComponentType<RootPortalProps>
32
41
 
33
- export { RootPortal }
42
+ export { RootPortal, RootPortalProps }
@@ -262,7 +262,7 @@ declare namespace ScrollViewProps {
262
262
  * H5 中 ScrollView 组件是通过一个高度(或宽度)固定的容器内部滚动来实现的,因此务必正确的设置容器的高度。例如: 如果 ScrollView 的高度将 body 撑开,就会同时存在两个滚动条(body 下的滚动条,以及 ScrollView 的滚动条)。
263
263
  * 微信小程序 中 ScrollView 组件如果设置 scrollX 横向滚动时,并且子元素为多个时(单个子元素时设置固定宽度则可以正常横向滚动),需要通过 WXSS 设置 `white-space: nowrap` 来保证元素不换行,并对 ScrollView 内部元素设置 `display: inline-block` 来使其能够横向滚动。
264
264
  * @classification viewContainer
265
- * @supported weapp, swan, alipay, tt, h5, rn
265
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
266
266
  * @example_react
267
267
  * ```tsx
268
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
@@ -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/Swiper.d.ts CHANGED
@@ -247,7 +247,7 @@ declare namespace SwiperProps {
247
247
  /** 滑块视图容器。其中只可放置 swiper-item 组件,否则会导致未定义的行为。
248
248
  * > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147)
249
249
  * @classification viewContainer
250
- * @supported weapp, swan, alipay, tt, h5, rn
250
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
251
251
  * @example_react
252
252
  * ```tsx
253
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
@@ -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>