@tarojs/components 3.5.8 → 3.5.10
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-view-core.cjs.entry.js +6 -2
- package/dist/collection/components/view/view.js +6 -3
- package/dist/esm/taro-view-core.entry.js +6 -2
- package/dist/esm-es5/taro-view-core.entry.js +1 -1
- package/dist/taro-components/p-0380841f.system.js +1 -1
- package/dist/taro-components/{p-8475421b.system.entry.js → p-7431b2e1.system.entry.js} +1 -1
- package/dist/taro-components/p-8b1dfd32.entry.js +1 -0
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/package.json +4 -4
- package/types/Ad.d.ts +1 -1
- package/types/Audio.d.ts +1 -1
- package/types/Button.d.ts +1 -1
- package/types/Camera.d.ts +1 -1
- package/types/Canvas.d.ts +1 -1
- package/types/Checkbox.d.ts +1 -1
- package/types/CheckboxGroup.d.ts +1 -1
- package/types/CoverImage.d.ts +1 -1
- package/types/CoverView.d.ts +102 -4
- package/types/CustomWrapper.d.ts +1 -1
- package/types/Form.d.ts +1 -1
- package/types/Icon.d.ts +1 -1
- package/types/Image.d.ts +1 -1
- package/types/Input.d.ts +71 -8
- package/types/LivePlayer.d.ts +1 -1
- package/types/LivePusher.d.ts +1 -1
- package/types/Map.d.ts +1 -1
- package/types/MatchMedia.d.ts +1 -1
- package/types/MovableArea.d.ts +2 -2
- package/types/MovableView.d.ts +17 -17
- package/types/Navigator.d.ts +1 -1
- package/types/OpenData.d.ts +1 -1
- package/types/PageContainer.d.ts +28 -18
- package/types/PageMeta.d.ts +1 -1
- package/types/Picker.d.ts +1 -1
- package/types/PickerView.d.ts +1 -1
- package/types/Progress.d.ts +1 -1
- package/types/Radio.d.ts +1 -1
- package/types/RadioGroup.d.ts +1 -1
- package/types/RootPortal.d.ts +11 -2
- package/types/ScrollView.d.ts +1 -1
- package/types/ShareElement.d.ts +20 -10
- package/types/Slider.d.ts +1 -1
- package/types/Swiper.d.ts +1 -1
- package/types/SwiperItem.d.ts +3 -2
- package/types/Switch.d.ts +1 -1
- package/types/Text.d.ts +1 -1
- package/types/Textarea.d.ts +7 -1
- package/types/Video.d.ts +7 -1
- package/types/View.d.ts +1 -1
- package/types/WebView.d.ts +1 -1
- package/types/index.vue3.d.ts +2 -1
- package/dist/taro-components/p-5a2305e7.entry.js +0 -1
package/types/MatchMedia.d.ts
CHANGED
|
@@ -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
|
package/types/MovableArea.d.ts
CHANGED
|
@@ -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 {
|
package/types/MovableView.d.ts
CHANGED
|
@@ -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,
|
|
193
|
+
* @supported weapp, alipay, swan, tt, qq, h5, rn
|
|
194
194
|
* @example_react
|
|
195
195
|
* ```tsx
|
|
196
196
|
* class App extends Components {
|
package/types/Navigator.d.ts
CHANGED
|
@@ -138,7 +138,7 @@ declare namespace NavigatorProps {
|
|
|
138
138
|
|
|
139
139
|
/** 页面链接
|
|
140
140
|
* @classification navig
|
|
141
|
-
* @supported weapp, swan,
|
|
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>
|
package/types/OpenData.d.ts
CHANGED
package/types/PageContainer.d.ts
CHANGED
|
@@ -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?:
|
|
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>
|
package/types/PageMeta.d.ts
CHANGED
|
@@ -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,
|
|
305
|
+
* @supported weapp, swan, alipay, tt, h5, rn
|
|
306
306
|
* @example_react
|
|
307
307
|
* ```tsx
|
|
308
308
|
* export default class PagePicker extends Component {
|
package/types/PickerView.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ declare namespace PickerViewProps {
|
|
|
66
66
|
/** 嵌入页面的滚动选择器
|
|
67
67
|
* 其中只可放置 picker-view-column 组件,其它节点不会显示
|
|
68
68
|
* @classification forms
|
|
69
|
-
* @supported weapp,
|
|
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 {
|
package/types/Progress.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ interface ProgressProps extends StandardProps {
|
|
|
81
81
|
|
|
82
82
|
/** 进度条。组件属性的长度单位默认为 px
|
|
83
83
|
* @classification base
|
|
84
|
-
* @supported weapp,
|
|
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,
|
|
47
|
+
* @supported weapp, alipay, swan, tt, qq, h5, rn
|
|
48
48
|
* @example_react
|
|
49
49
|
* ```tsx
|
|
50
50
|
* export default class PageRadio extends Component {
|
package/types/RadioGroup.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare namespace RadioGroupProps {
|
|
|
19
19
|
|
|
20
20
|
/** 单项选择器,内部由多个 Radio 组成。
|
|
21
21
|
* @classification forms
|
|
22
|
-
* @supported weapp,
|
|
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>
|
package/types/RootPortal.d.ts
CHANGED
|
@@ -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 }
|
package/types/ScrollView.d.ts
CHANGED
|
@@ -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,
|
|
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 {
|
package/types/ShareElement.d.ts
CHANGED
|
@@ -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?:
|
|
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,
|
|
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,
|
|
250
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
251
251
|
* @example_react
|
|
252
252
|
* ```tsx
|
|
253
253
|
* class App extends Component {
|
package/types/SwiperItem.d.ts
CHANGED
|
@@ -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?:
|
|
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,
|
|
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,
|
|
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>
|
package/types/Text.d.ts
CHANGED
package/types/Textarea.d.ts
CHANGED
|
@@ -136,6 +136,12 @@ interface TextareaProps extends StandardProps, FormItemProps {
|
|
|
136
136
|
*/
|
|
137
137
|
controlled?: string
|
|
138
138
|
|
|
139
|
+
/** 使用原生键盘
|
|
140
|
+
* @default false
|
|
141
|
+
* @supported alipay
|
|
142
|
+
*/
|
|
143
|
+
enableNative?: boolean
|
|
144
|
+
|
|
139
145
|
/** 无障碍访问,(属性)元素的额外描述
|
|
140
146
|
* @supported qq
|
|
141
147
|
*/
|
|
@@ -218,7 +224,7 @@ declare namespace TextareaProps {
|
|
|
218
224
|
|
|
219
225
|
/** 多行输入框。该组件是原生组件,使用时请注意相关限制
|
|
220
226
|
* @classification forms
|
|
221
|
-
* @supported weapp, h5, rn
|
|
227
|
+
* @supported weapp, alipay, swan, tt, qq, h5, rn
|
|
222
228
|
* @example_react
|
|
223
229
|
* ```tsx
|
|
224
230
|
* export default class PageView extends Component {
|
package/types/Video.d.ts
CHANGED
|
@@ -282,6 +282,12 @@ interface VideoProps extends StandardProps {
|
|
|
282
282
|
*/
|
|
283
283
|
mobilenetHintType?: string
|
|
284
284
|
|
|
285
|
+
/** 使用原生
|
|
286
|
+
* @default true
|
|
287
|
+
* @supported alipay
|
|
288
|
+
*/
|
|
289
|
+
enableNative?: boolean
|
|
290
|
+
|
|
285
291
|
/** 浮窗设置。暂时不支持全局浮窗。
|
|
286
292
|
* 可选值:
|
|
287
293
|
*
|
|
@@ -637,7 +643,7 @@ declare namespace VideoProps {
|
|
|
637
643
|
|
|
638
644
|
/** 视频。相关api:Taro.createVideoContext
|
|
639
645
|
* @classification media
|
|
640
|
-
* @supported weapp,
|
|
646
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
641
647
|
* @example_react
|
|
642
648
|
* ```tsx
|
|
643
649
|
* export default class PageView extends Component {
|
package/types/View.d.ts
CHANGED
|
@@ -142,7 +142,7 @@ interface ViewProps extends StandardProps {
|
|
|
142
142
|
|
|
143
143
|
/** 视图容器
|
|
144
144
|
* @classification viewContainer
|
|
145
|
-
* @supported weapp,
|
|
145
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
146
146
|
* @example_react
|
|
147
147
|
* ```tsx
|
|
148
148
|
* export default class PageView extends Component {
|
package/types/WebView.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ declare namespace WebViewProps {
|
|
|
49
49
|
|
|
50
50
|
/** web-view 组件是一个可以用来承载网页的容器,会自动铺满整个小程序页面。个人类型与海外类型的小程序暂不支持使用。
|
|
51
51
|
* @classification open
|
|
52
|
-
* @supported weapp,
|
|
52
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
53
53
|
* @example_react
|
|
54
54
|
* ```tsx
|
|
55
55
|
* class App extends Component {
|
package/types/index.vue3.d.ts
CHANGED
|
@@ -282,7 +282,8 @@ declare global {
|
|
|
282
282
|
|
|
283
283
|
'custom-wrapper': ElementAttrs<TransformReact2VueType<CustomWrapperProps>>
|
|
284
284
|
'taro-custom-wrapper-core': ElementAttrs<TransformReact2VueType<CustomWrapperProps>>
|
|
285
|
-
|
|
285
|
+
/** 为了不与vue3模板默认的slot冲突,增加 Record<string, any> */
|
|
286
|
+
'slot': ElementAttrs<TransformReact2VueType<SlotProps>> & Record<string, any>
|
|
286
287
|
'taro-slot-core': ElementAttrs<TransformReact2VueType<SlotProps>>
|
|
287
288
|
}
|
|
288
289
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,H as i,g as h}from"./p-059912fd.js";import{c as o}from"./p-76724e58.js";let r=class{constructor(e){t(this,e),this.onLongPress=s(this,"longpress",7),this.hoverStartTime=50,this.hoverStayTime=400,this.hover=!1,this.touch=!1,this.startTime=0}onTouchStart(){this.hoverClass&&(this.touch=!0,setTimeout((()=>{this.touch&&(this.hover=!0)}),this.hoverStartTime)),this.timeoutEvent=setTimeout((()=>{this.onLongPress.emit()}),350),this.startTime=Date.now()}onTouchMove(){clearTimeout(this.timeoutEvent)}onTouchEnd(){Date.now()-this.startTime<350&&clearTimeout(this.timeoutEvent),this.hoverClass&&(this.touch=!1,setTimeout((()=>{this.touch||(this.hover=!1)}),this.hoverStayTime))}componentDidRender(){this.el.childNodes.forEach((t=>{t.nodeType===document.COMMENT_NODE&&t["s-cn"]&&(t["s-cn"]=!1)}))}render(){const t=o({[`${this.hoverClass}`]:this.hover});let s={};return this.animation&&(s.animation=this.animation,s["data-animation"]=this.animation),e(i,Object.assign({class:t},s),e("slot",null))}get el(){return h(this)}};r.style="body,html{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-view-core{display:block}";export{r as taro_view_core}
|