@tarojs/components 3.7.0-canary.6 → 4.0.0-alpha.0
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-components.cjs.js +1 -1
- package/dist/cjs/{taro-pull-to-refresh.cjs.entry.js → taro-pull-to-refresh-core.cjs.entry.js} +14 -12
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +68 -47
- package/dist/collection/components/pull-to-refresh/pull-to-refresh.js +14 -12
- package/dist/collection/components/swiper/swiper-item.js +54 -33
- package/dist/collection/components/swiper/swiper.js +31 -14
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/taro-pull-to-refresh-core.d.ts +11 -0
- package/dist/components/{taro-pull-to-refresh.js → taro-pull-to-refresh-core.js} +18 -16
- package/dist/components/taro-swiper-core.js +31 -14
- package/dist/components/taro-swiper-item-core.js +40 -36
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/{taro-pull-to-refresh.entry.js → taro-pull-to-refresh-core.entry.js} +14 -12
- package/dist/esm/taro-swiper-core_2.entry.js +68 -47
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/{taro-pull-to-refresh.entry.js → taro-pull-to-refresh-core.entry.js} +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/taro-components/{p-4f1d180d.entry.js → p-c99e14b5.entry.js} +1 -1
- package/dist/taro-components/p-cbcaad0e.system.entry.js +1 -0
- package/dist/taro-components/{p-7102ecf5.system.entry.js → p-d025a415.system.entry.js} +1 -1
- package/dist/taro-components/{p-d8fe59c7.entry.js → p-dadd02ca.entry.js} +1 -1
- package/dist/taro-components/p-ed331c06.system.js +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/swiper/swiper-item.d.ts +3 -0
- package/dist/types/components/swiper/swiper.d.ts +1 -2
- package/dist/types/components.d.ts +14 -12
- package/lib/react/components.d.ts +1 -1
- package/lib/react/components.js +2 -2
- package/lib/react/components.js.map +1 -1
- package/lib/vue2/components.d.ts +1 -0
- package/lib/vue2/components.js +4 -3
- package/lib/vue2/components.js.map +1 -1
- package/lib/vue3/components.d.ts +1 -1
- package/lib/vue3/components.js +4 -3
- package/lib/vue3/components.js.map +1 -1
- package/package.json +7 -4
- package/types/Button.d.ts +5 -5
- package/types/Camera.d.ts +1 -1
- package/types/Canvas.d.ts +1 -1
- package/types/Checkbox.d.ts +5 -5
- package/types/CoverImage.d.ts +1 -1
- package/types/Form.d.ts +2 -2
- package/types/Icon.d.ts +3 -3
- package/types/Image.d.ts +3 -2
- package/types/Input.d.ts +15 -15
- package/types/Label.d.ts +1 -1
- package/types/NavigationBar.d.ts +1 -1
- package/types/Navigator.d.ts +1 -1
- package/types/Picker.d.ts +20 -20
- package/types/PickerView.d.ts +1 -1
- package/types/PickerViewColumn.d.ts +1 -1
- package/types/Progress.d.ts +1 -1
- package/types/Radio.d.ts +5 -5
- package/types/RadioGroup.d.ts +1 -1
- package/types/ScrollView.d.ts +4 -4
- package/types/Slider.d.ts +14 -14
- package/types/Slot.d.ts +1 -1
- package/types/Swiper.d.ts +11 -9
- package/types/SwiperItem.d.ts +6 -1
- package/types/Switch.d.ts +5 -5
- package/types/Text.d.ts +2 -2
- package/types/Textarea.d.ts +7 -7
- package/types/Video.d.ts +16 -16
- package/types/common.d.ts +2 -1
- package/dist/components/taro-pull-to-refresh.d.ts +0 -11
- package/dist/taro-components/p-60faf73e.system.entry.js +0 -1
package/types/Picker.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ interface PickerStandardProps extends StandardProps, FormItemProps {
|
|
|
6
6
|
/**
|
|
7
7
|
* 选择器类型,默认是普通选择器
|
|
8
8
|
* @default "selector"
|
|
9
|
-
* @supported weapp, h5, rn
|
|
9
|
+
* @supported weapp, h5, rn, harmony
|
|
10
10
|
*/
|
|
11
11
|
mode?: keyof PickerStandardProps.Mode
|
|
12
12
|
/**
|
|
@@ -17,7 +17,7 @@ interface PickerStandardProps extends StandardProps, FormItemProps {
|
|
|
17
17
|
disabled?: boolean
|
|
18
18
|
/**
|
|
19
19
|
* 取消选择或点遮罩层收起 picker 时触发
|
|
20
|
-
* @supported weapp, h5, rn
|
|
20
|
+
* @supported weapp, h5, rn, harmony
|
|
21
21
|
*/
|
|
22
22
|
onCancel?: CommonEventFunction
|
|
23
23
|
}
|
|
@@ -46,18 +46,18 @@ interface PickerSelectorProps extends PickerStandardProps {
|
|
|
46
46
|
mode?: 'selector'
|
|
47
47
|
/**
|
|
48
48
|
* mode为 selector 或 multiSelector 时,range 有效
|
|
49
|
-
* @supported weapp, h5, rn
|
|
49
|
+
* @supported weapp, h5, rn, harmony
|
|
50
50
|
* @default []
|
|
51
51
|
*/
|
|
52
52
|
range: string[] | number[] | Record<string, any>[]
|
|
53
53
|
/**
|
|
54
54
|
* 当 range 是一个 Object Array 时,通过 rangeKey 来指定 Object 中 key 的值作为选择器显示内容
|
|
55
|
-
* @supported weapp, h5, rn
|
|
55
|
+
* @supported weapp, h5, rn, harmony
|
|
56
56
|
*/
|
|
57
57
|
rangeKey?: string
|
|
58
58
|
/**
|
|
59
59
|
* 表示选择了 range 中的第几个(下标从 0 开始)
|
|
60
|
-
* @supported weapp, h5, rn
|
|
60
|
+
* @supported weapp, h5, rn, harmony
|
|
61
61
|
* @default 0
|
|
62
62
|
*/
|
|
63
63
|
value?: number
|
|
@@ -75,12 +75,12 @@ interface PickerSelectorProps extends PickerStandardProps {
|
|
|
75
75
|
indicatorStyle?: StyleProp<ViewStyle>
|
|
76
76
|
/**
|
|
77
77
|
* value 改变时触发 change 事件
|
|
78
|
-
* @supported weapp, h5, rn
|
|
78
|
+
* @supported weapp, h5, rn, harmony
|
|
79
79
|
*/
|
|
80
80
|
onChange: CommonEventFunction<PickerSelectorProps.ChangeEventDetail>
|
|
81
81
|
/**
|
|
82
82
|
* 用于替换组件内部文本
|
|
83
|
-
* @supported h5
|
|
83
|
+
* @supported h5, harmony
|
|
84
84
|
*/
|
|
85
85
|
textProps?: PickerStandardProps.PickerText
|
|
86
86
|
}
|
|
@@ -96,18 +96,18 @@ interface PickerMultiSelectorProps extends PickerStandardProps {
|
|
|
96
96
|
mode: 'multiSelector'
|
|
97
97
|
/**
|
|
98
98
|
* mode为 selector 或 multiSelector 时,range 有效
|
|
99
|
-
* @supported weapp, h5, rn
|
|
99
|
+
* @supported weapp, h5, rn, harmony
|
|
100
100
|
* @default []
|
|
101
101
|
*/
|
|
102
102
|
range: Array<string[]> | Array<number[]> | Array<Record<string, any>[]>
|
|
103
103
|
/**
|
|
104
104
|
* 当 range 是一个 Object Array 时,通过 rangeKey 来指定 Object 中 key 的值作为选择器显示内容
|
|
105
|
-
* @supported weapp, h5, rn
|
|
105
|
+
* @supported weapp, h5, rn, harmony
|
|
106
106
|
*/
|
|
107
107
|
rangeKey?: string
|
|
108
108
|
/**
|
|
109
109
|
* 表示选择了 range 中的第几个(下标从 0 开始)
|
|
110
|
-
* @supported weapp, h5, rn
|
|
110
|
+
* @supported weapp, h5, rn, harmony
|
|
111
111
|
* @default []
|
|
112
112
|
*/
|
|
113
113
|
value: number[] | string[] | Record<string, any>[]
|
|
@@ -125,12 +125,12 @@ interface PickerMultiSelectorProps extends PickerStandardProps {
|
|
|
125
125
|
indicatorStyle?: StyleProp<ViewStyle>
|
|
126
126
|
/**
|
|
127
127
|
* 当 value 改变时触发 change 事件
|
|
128
|
-
* @supported weapp, h5, rn
|
|
128
|
+
* @supported weapp, h5, rn, harmony
|
|
129
129
|
*/
|
|
130
130
|
onChange: CommonEventFunction<PickerMultiSelectorProps.ChangeEventDetail>
|
|
131
131
|
/**
|
|
132
132
|
* 列改变时触发
|
|
133
|
-
* @supported weapp, h5, rn
|
|
133
|
+
* @supported weapp, h5, rn, harmony
|
|
134
134
|
*/
|
|
135
135
|
onColumnChange?: CommonEventFunction<PickerMultiSelectorProps.ColumnChangeEventDetail>
|
|
136
136
|
}
|
|
@@ -152,22 +152,22 @@ interface PickerTimeProps extends PickerStandardProps {
|
|
|
152
152
|
mode: 'time'
|
|
153
153
|
/**
|
|
154
154
|
* value 的值表示选择了 range 中的第几个(下标从 0 开始)
|
|
155
|
-
* @supported weapp, h5, rn
|
|
155
|
+
* @supported weapp, h5, rn, harmony
|
|
156
156
|
*/
|
|
157
157
|
value: string
|
|
158
158
|
/**
|
|
159
159
|
* 仅当 mode 为 "time" 或 "date" 时有效,表示有效时间范围的开始,字符串格式为"hh:mm"
|
|
160
|
-
* @supported weapp, h5, rn
|
|
160
|
+
* @supported weapp, h5, rn, harmony
|
|
161
161
|
*/
|
|
162
162
|
start?: string
|
|
163
163
|
/**
|
|
164
164
|
* 仅当 mode 为 "time" 或 "date" 时有效,表示有效时间范围的结束,字符串格式为"hh:mm"
|
|
165
|
-
* @supported weapp, h5, rn
|
|
165
|
+
* @supported weapp, h5, rn, harmony
|
|
166
166
|
*/
|
|
167
167
|
end?: string
|
|
168
168
|
/**
|
|
169
169
|
* value 改变时触发 change 事件
|
|
170
|
-
* @supported weapp, h5, rn
|
|
170
|
+
* @supported weapp, h5, rn, harmony
|
|
171
171
|
*/
|
|
172
172
|
onChange: CommonEventFunction<PickerTimeProps.ChangeEventDetail>
|
|
173
173
|
}
|
|
@@ -183,18 +183,18 @@ interface PickerDateProps extends PickerStandardProps {
|
|
|
183
183
|
mode: 'date'
|
|
184
184
|
/**
|
|
185
185
|
* 表示选中的日期,格式为"YYYY-MM-DD"
|
|
186
|
-
* @supported weapp, h5, rn
|
|
186
|
+
* @supported weapp, h5, rn, harmony
|
|
187
187
|
* @default 0
|
|
188
188
|
*/
|
|
189
189
|
value: string
|
|
190
190
|
/**
|
|
191
191
|
* 仅当 mode 为 "time" 或 "date" 时有效,表示有效时间范围的开始,字符串格式为"YYYY-MM-DD"
|
|
192
|
-
* @supported weapp, h5, rn
|
|
192
|
+
* @supported weapp, h5, rn, harmony
|
|
193
193
|
*/
|
|
194
194
|
start?: string
|
|
195
195
|
/**
|
|
196
196
|
* 仅当 mode 为 "time" 或 "date" 时有效,表示有效时间范围的结束,字符串格式为"YYYY-MM-DD"
|
|
197
|
-
* @supported weapp, h5, rn
|
|
197
|
+
* @supported weapp, h5, rn, harmony
|
|
198
198
|
*/
|
|
199
199
|
end?: string
|
|
200
200
|
/**
|
|
@@ -205,7 +205,7 @@ interface PickerDateProps extends PickerStandardProps {
|
|
|
205
205
|
fields?: keyof PickerDateProps.Fields
|
|
206
206
|
/**
|
|
207
207
|
* value 改变时触发 change 事件
|
|
208
|
-
* @supported weapp, h5, rn
|
|
208
|
+
* @supported weapp, h5, rn, harmony
|
|
209
209
|
*/
|
|
210
210
|
onChange: CommonEventFunction<PickerDateProps.ChangeEventDetail>
|
|
211
211
|
}
|
package/types/PickerView.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ declare namespace PickerViewProps {
|
|
|
55
55
|
/** 嵌入页面的滚动选择器
|
|
56
56
|
* 其中只可放置 picker-view-column 组件,其它节点不会显示
|
|
57
57
|
* @classification forms
|
|
58
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
58
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
59
59
|
* @example_react
|
|
60
60
|
* ```tsx
|
|
61
61
|
* export default class Picks extends Component {
|
|
@@ -5,7 +5,7 @@ type PickerViewColumnProps = StandardProps
|
|
|
5
5
|
/** 滚动选择器子项
|
|
6
6
|
* 仅可放置于 `<PickerView />` 中,其孩子节点的高度会自动设置成与 picker-view 的选中框的高度一致
|
|
7
7
|
* @classification forms
|
|
8
|
-
* @supported weapp, swan, alipay, tt, h5, rn
|
|
8
|
+
* @supported weapp, swan, alipay, tt, h5, rn
|
|
9
9
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/picker-view-column.html
|
|
10
10
|
*/
|
|
11
11
|
declare const PickerViewColumn: ComponentType<StandardProps>
|
package/types/Progress.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ interface ProgressProps extends StandardProps {
|
|
|
68
68
|
}
|
|
69
69
|
/** 进度条。组件属性的长度单位默认为 px
|
|
70
70
|
* @classification base
|
|
71
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
71
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
72
72
|
* @example_react
|
|
73
73
|
* ```tsx
|
|
74
74
|
* export default class PageView extends Component {
|
package/types/Radio.d.ts
CHANGED
|
@@ -2,22 +2,22 @@ import { ComponentType } from 'react'
|
|
|
2
2
|
import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
3
3
|
interface RadioProps extends StandardProps {
|
|
4
4
|
/** `<Radio/>` 标识。当该`<Radio/>` 选中时,`<RadioGroup/>`的 change 事件会携带`<Radio/>`的 value
|
|
5
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
5
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
6
6
|
*/
|
|
7
7
|
value?: string
|
|
8
8
|
/** 当前是否选中
|
|
9
9
|
* @default false
|
|
10
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
10
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
11
11
|
*/
|
|
12
12
|
checked?: boolean
|
|
13
13
|
/** 是否禁用
|
|
14
14
|
* @default false
|
|
15
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
15
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
16
16
|
*/
|
|
17
17
|
disabled?: boolean
|
|
18
18
|
/** Radio 的颜色,同 css 的 color
|
|
19
19
|
* @default "#09BB07"
|
|
20
|
-
* @supported weapp, alipay, swan, tt, qq, jd, rn
|
|
20
|
+
* @supported weapp, alipay, swan, tt, qq, jd, rn, harmony
|
|
21
21
|
*/
|
|
22
22
|
color?: string
|
|
23
23
|
/**
|
|
@@ -34,7 +34,7 @@ interface RadioProps extends StandardProps {
|
|
|
34
34
|
*/
|
|
35
35
|
ariaLabel?: string
|
|
36
36
|
/** <radio-group/> 中的选中项发生变化时触发 change 事件
|
|
37
|
-
* @supported h5, rn
|
|
37
|
+
* @supported h5, rn, harmony
|
|
38
38
|
*/
|
|
39
39
|
onChange?: CommonEventFunction<{
|
|
40
40
|
value?: string
|
package/types/RadioGroup.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ComponentType } from 'react'
|
|
|
2
2
|
import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
3
3
|
interface RadioGroupProps extends StandardProps, FormItemProps {
|
|
4
4
|
/** 组件名字,用于表单提交获取数据。
|
|
5
|
-
* @supported alipay, tt
|
|
5
|
+
* @supported alipay, tt, harmony
|
|
6
6
|
*/
|
|
7
7
|
name?: string
|
|
8
8
|
/** RadioGroup 中选中项发生改变时触发 change 事件,detail = {value:[选中的radio的value的数组]}
|
package/types/ScrollView.d.ts
CHANGED
|
@@ -3,13 +3,13 @@ import { BaseEventOrigFunction, CommonEventFunction, StandardProps } from './com
|
|
|
3
3
|
interface ScrollViewProps extends StandardProps {
|
|
4
4
|
/** 允许横向滚动
|
|
5
5
|
* @default false
|
|
6
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
6
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
7
7
|
* @rn 二选一
|
|
8
8
|
*/
|
|
9
9
|
scrollX?: boolean
|
|
10
10
|
/** 允许纵向滚动
|
|
11
11
|
* @default false
|
|
12
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
12
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
13
13
|
* @rn 二选一
|
|
14
14
|
*/
|
|
15
15
|
scrollY?: boolean
|
|
@@ -91,7 +91,7 @@ interface ScrollViewProps extends StandardProps {
|
|
|
91
91
|
*/
|
|
92
92
|
bounces?: boolean
|
|
93
93
|
/** 滚动条显隐控制 (同时开启 enhanced 属性后生效)
|
|
94
|
-
* @supported weapp
|
|
94
|
+
* @supported weapp, harmony
|
|
95
95
|
* @default true
|
|
96
96
|
*/
|
|
97
97
|
showScrollbar?: boolean
|
|
@@ -220,7 +220,7 @@ interface ScrollViewProps extends StandardProps {
|
|
|
220
220
|
*/
|
|
221
221
|
onScrollToLower?: CommonEventFunction
|
|
222
222
|
/** 滚动时触发
|
|
223
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
223
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
224
224
|
*/
|
|
225
225
|
onScroll?: BaseEventOrigFunction<ScrollViewProps.onScrollDetail>
|
|
226
226
|
/** 滚动开始事件
|
package/types/Slider.d.ts
CHANGED
|
@@ -3,62 +3,62 @@ import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
|
3
3
|
interface SliderProps extends StandardProps, FormItemProps {
|
|
4
4
|
/** 最小值
|
|
5
5
|
* @default 0
|
|
6
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
6
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
7
7
|
*/
|
|
8
8
|
min?: number
|
|
9
9
|
/** 最大值
|
|
10
10
|
* @default 100
|
|
11
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
11
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
12
12
|
*/
|
|
13
13
|
max?: number
|
|
14
14
|
/** 步长,取值必须大于 0,并且可被(max - min)整除
|
|
15
15
|
* @default 1
|
|
16
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
16
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
17
17
|
*/
|
|
18
18
|
step?: number
|
|
19
19
|
/** 是否禁用
|
|
20
20
|
* @default false
|
|
21
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
21
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
22
22
|
*/
|
|
23
23
|
disabled?: boolean
|
|
24
24
|
/** 当前取值
|
|
25
25
|
* @default 0
|
|
26
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
26
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
27
27
|
*/
|
|
28
28
|
value?: number
|
|
29
29
|
/** 背景条的颜色(请使用 backgroundColor)
|
|
30
30
|
* @default "#e9e9e9"
|
|
31
|
-
* @supported weapp, tt, qq, jd
|
|
31
|
+
* @supported weapp, tt, qq, jd, harmony
|
|
32
32
|
*/
|
|
33
33
|
color?: string
|
|
34
34
|
/** 已选择的颜色(请使用 activeColor)
|
|
35
35
|
* @default "#1aad19"
|
|
36
|
-
* @supported weapp, tt, qq, jd
|
|
36
|
+
* @supported weapp, tt, qq, jd, harmony
|
|
37
37
|
*/
|
|
38
38
|
selectedColor?: string
|
|
39
39
|
/** 已选择的颜色
|
|
40
40
|
* @default "#1aad19"
|
|
41
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
41
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
42
42
|
*/
|
|
43
43
|
activeColor?: string
|
|
44
44
|
/** 背景条的颜色
|
|
45
45
|
* @default "#e9e9e9"
|
|
46
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
46
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
47
47
|
*/
|
|
48
48
|
backgroundColor?: string
|
|
49
49
|
/** 滑块的大小,取值范围为 12 - 28
|
|
50
50
|
* @default 28
|
|
51
|
-
* @supported weapp, swan, tt, qq, jd, h5
|
|
51
|
+
* @supported weapp, swan, tt, qq, jd, h5, harmony
|
|
52
52
|
*/
|
|
53
53
|
blockSize?: number
|
|
54
54
|
/** 滑块的颜色
|
|
55
55
|
* @default "#ffffff"
|
|
56
|
-
* @supported weapp, swan, tt, qq, jd, h5, rn
|
|
56
|
+
* @supported weapp, swan, tt, qq, jd, h5, rn, harmony
|
|
57
57
|
*/
|
|
58
58
|
blockColor?: string
|
|
59
59
|
/** 是否显示当前 value
|
|
60
60
|
* @default false
|
|
61
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
61
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
62
62
|
*/
|
|
63
63
|
showValue?: boolean
|
|
64
64
|
/** 组件名字,用于表单提交获取数据。
|
|
@@ -84,11 +84,11 @@ interface SliderProps extends StandardProps, FormItemProps {
|
|
|
84
84
|
*/
|
|
85
85
|
ariaLabel?: string
|
|
86
86
|
/** 完成一次拖动后触发的事件
|
|
87
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
87
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
88
88
|
*/
|
|
89
89
|
onChange?: CommonEventFunction<SliderProps.onChangeEventDetail>
|
|
90
90
|
/** 拖动过程中触发的事件
|
|
91
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
91
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
92
92
|
*/
|
|
93
93
|
onChanging?: CommonEventFunction<SliderProps.onChangeEventDetail>
|
|
94
94
|
}
|
package/types/Slot.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ interface SlotProps extends StandardProps {
|
|
|
17
17
|
|
|
18
18
|
/** slot 插槽
|
|
19
19
|
* @classification viewContainer
|
|
20
|
-
* @supported weapp, swan, alipay, tt, jd, qq,
|
|
20
|
+
* @supported weapp, swan, alipay, tt, jd, qq, h5
|
|
21
21
|
* @example
|
|
22
22
|
* ```tsx
|
|
23
23
|
* import { Slot, View, Text } from '@tarojs/components'
|
package/types/Swiper.d.ts
CHANGED
|
@@ -3,30 +3,32 @@ import { StandardProps, CommonEventFunction } from './common'
|
|
|
3
3
|
interface SwiperProps extends StandardProps {
|
|
4
4
|
/** 是否显示面板指示点
|
|
5
5
|
* @default false
|
|
6
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
6
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
7
7
|
*/
|
|
8
8
|
indicatorDots?: boolean
|
|
9
9
|
/** 指示点颜色
|
|
10
10
|
* @default "rgba(0, 0, 0, .3)"
|
|
11
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
11
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
12
12
|
*/
|
|
13
13
|
indicatorColor?: string
|
|
14
14
|
/** 当前选中的指示点颜色
|
|
15
15
|
* @default "#000000"
|
|
16
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
16
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
17
17
|
*/
|
|
18
18
|
indicatorActiveColor?: string
|
|
19
19
|
/** 是否自动切换
|
|
20
20
|
* @default false
|
|
21
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
21
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
22
22
|
*/
|
|
23
23
|
autoplay?: boolean
|
|
24
24
|
/** 当前所在滑块的 index
|
|
25
25
|
* @default 0
|
|
26
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
26
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
27
27
|
*/
|
|
28
28
|
current?: number
|
|
29
29
|
/** 当前所在滑块的 item-id ,不能与 current 被同时指定
|
|
30
|
+
* @supported tt
|
|
31
|
+
* @weapp deprecated
|
|
30
32
|
* @default ""
|
|
31
33
|
* @supported tt
|
|
32
34
|
* @weapp deprecated
|
|
@@ -34,12 +36,12 @@ interface SwiperProps extends StandardProps {
|
|
|
34
36
|
currentItemId?: string
|
|
35
37
|
/** 自动切换时间间隔
|
|
36
38
|
* @default 5000
|
|
37
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
39
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
38
40
|
*/
|
|
39
41
|
interval?: number
|
|
40
42
|
/** 滑动动画时长
|
|
41
43
|
* @default 500
|
|
42
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5
|
|
44
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, harmony
|
|
43
45
|
*/
|
|
44
46
|
duration?: number
|
|
45
47
|
/** 是否采用衔接滑动
|
|
@@ -49,7 +51,7 @@ interface SwiperProps extends StandardProps {
|
|
|
49
51
|
circular?: boolean
|
|
50
52
|
/** 滑动方向是否为纵向
|
|
51
53
|
* @default false
|
|
52
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
54
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
53
55
|
*/
|
|
54
56
|
vertical?: boolean
|
|
55
57
|
/** 前边距,可用于露出前一项的一小部分,接受 px 和 rpx 值
|
|
@@ -152,7 +154,7 @@ interface SwiperProps extends StandardProps {
|
|
|
152
154
|
*/
|
|
153
155
|
cacheExtent?: number
|
|
154
156
|
/** current 改变时会触发 change 事件
|
|
155
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
157
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
156
158
|
*/
|
|
157
159
|
onChange?: CommonEventFunction<SwiperProps.onChangeEventDetail>
|
|
158
160
|
/** swiper-item 的位置发生改变时会触发 transition 事件
|
package/types/SwiperItem.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ComponentType } from 'react'
|
|
|
2
2
|
import { StandardProps } from './common'
|
|
3
3
|
interface SwiperItemProps extends StandardProps {
|
|
4
4
|
/** 该 swiper-item 的标识符
|
|
5
|
-
* @supported weapp, swan, tt, jd, h5, rn
|
|
5
|
+
* @supported weapp, swan, tt, jd, h5, rn, harmony
|
|
6
6
|
*/
|
|
7
7
|
itemId?: string
|
|
8
8
|
/** 是否跳过未显示的滑块布局,设为 true 可优化复杂情况下的滑动性能,但会丢失隐藏状态滑块的布局信息
|
|
@@ -10,6 +10,11 @@ interface SwiperItemProps extends StandardProps {
|
|
|
10
10
|
* @supported weapp
|
|
11
11
|
*/
|
|
12
12
|
skipHiddenItemLayout?: boolean
|
|
13
|
+
/** Swiper 循环状态下,前后垫片节点拷贝模式,用于修复 Vue 在 CustomElements 下的节点拷贝问题
|
|
14
|
+
* @default false
|
|
15
|
+
* @supported h5
|
|
16
|
+
*/
|
|
17
|
+
deep?: boolean
|
|
13
18
|
}
|
|
14
19
|
/** 仅可放置在 swiper 组件中,宽高自动设置为100%
|
|
15
20
|
* > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147)
|
package/types/Switch.d.ts
CHANGED
|
@@ -3,22 +3,22 @@ import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
|
3
3
|
interface SwitchProps extends StandardProps, FormItemProps {
|
|
4
4
|
/** 是否选中
|
|
5
5
|
* @default false
|
|
6
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
6
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
7
7
|
*/
|
|
8
8
|
checked?: boolean
|
|
9
9
|
/** 是否禁用
|
|
10
10
|
* @default false
|
|
11
|
-
* @supported weapp, alipay, swan, tt, qq, h5, rn
|
|
11
|
+
* @supported weapp, alipay, swan, tt, qq, h5, rn, harmony
|
|
12
12
|
*/
|
|
13
13
|
disabled?: boolean
|
|
14
14
|
/** 样式,有效值:switch, checkbox
|
|
15
15
|
* @default "switch"
|
|
16
|
-
* @supported weapp, swan, tt, qq, jd, h5, rn
|
|
16
|
+
* @supported weapp, swan, tt, qq, jd, h5, rn, harmony
|
|
17
17
|
*/
|
|
18
18
|
type?: 'switch' | 'checkbox'
|
|
19
19
|
/** switch 的颜色,同 css 的 color
|
|
20
20
|
* @default "#04BE02"
|
|
21
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
21
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
22
22
|
*/
|
|
23
23
|
color?: string
|
|
24
24
|
/** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
|
|
@@ -39,7 +39,7 @@ interface SwitchProps extends StandardProps, FormItemProps {
|
|
|
39
39
|
*/
|
|
40
40
|
ariaLabel?: string
|
|
41
41
|
/** checked 改变时触发 change 事件
|
|
42
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
42
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
43
43
|
*/
|
|
44
44
|
onChange?: CommonEventFunction<SwitchProps.onChangeEventDetail>
|
|
45
45
|
}
|
package/types/Text.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ interface TextProps extends StandardProps {
|
|
|
26
26
|
*/
|
|
27
27
|
numberOfLines?: number
|
|
28
28
|
/** 限制文本最大行数
|
|
29
|
-
* @supported weapp
|
|
29
|
+
* @supported weapp, harmony
|
|
30
30
|
*/
|
|
31
31
|
maxLines?: number
|
|
32
32
|
}
|
|
@@ -43,7 +43,7 @@ declare namespace TextProps {
|
|
|
43
43
|
}
|
|
44
44
|
/** 文本
|
|
45
45
|
* @classification base
|
|
46
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
46
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
47
47
|
* @example_react
|
|
48
48
|
* ```tsx
|
|
49
49
|
* export default class PageView extends Component {
|
package/types/Textarea.d.ts
CHANGED
|
@@ -2,15 +2,15 @@ import { ComponentType } from 'react'
|
|
|
2
2
|
import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
3
3
|
interface TextareaProps extends StandardProps, FormItemProps {
|
|
4
4
|
/** 输入框的内容
|
|
5
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
5
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
6
6
|
*/
|
|
7
7
|
value?: string
|
|
8
8
|
/** 输入框为空时占位符
|
|
9
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
9
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
10
10
|
*/
|
|
11
11
|
placeholder?: string
|
|
12
12
|
/** 指定 placeholder 的样式
|
|
13
|
-
* @supported weapp, alipay, swan, tt, qq, jd
|
|
13
|
+
* @supported weapp, alipay, swan, tt, qq, jd, harmony
|
|
14
14
|
*/
|
|
15
15
|
placeholderStyle?: string
|
|
16
16
|
/** 指定 placeholder 的样式类
|
|
@@ -124,11 +124,11 @@ interface TextareaProps extends StandardProps, FormItemProps {
|
|
|
124
124
|
*/
|
|
125
125
|
adjustKeyboardTo?: boolean
|
|
126
126
|
/** 输入框聚焦时触发
|
|
127
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
127
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
128
128
|
*/
|
|
129
129
|
onFocus?: CommonEventFunction<TextareaProps.onFocusEventDetail>
|
|
130
130
|
/** 输入框失去焦点时触发
|
|
131
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
131
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
132
132
|
*/
|
|
133
133
|
onBlur?: CommonEventFunction<TextareaProps.onBlurEventDetail>
|
|
134
134
|
/** 输入框行数变化时调用
|
|
@@ -138,7 +138,7 @@ interface TextareaProps extends StandardProps, FormItemProps {
|
|
|
138
138
|
/** 当键盘输入时,触发 input 事件
|
|
139
139
|
*
|
|
140
140
|
* **onInput 处理函数的返回值并不会反映到 textarea 上**
|
|
141
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
141
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
142
142
|
*/
|
|
143
143
|
onInput?: CommonEventFunction<TextareaProps.onInputEventDetail>
|
|
144
144
|
/** 点击完成时, 触发 confirm 事件
|
|
@@ -146,7 +146,7 @@ interface TextareaProps extends StandardProps, FormItemProps {
|
|
|
146
146
|
*/
|
|
147
147
|
onConfirm?: CommonEventFunction<TextareaProps.onConfirmEventDetail>
|
|
148
148
|
/** 键盘高度发生变化的时候触发此事件
|
|
149
|
-
* @supported weapp, tt
|
|
149
|
+
* @supported weapp, tt, harmony
|
|
150
150
|
*/
|
|
151
151
|
onKeyboardHeightChange?: CommonEventFunction<TextareaProps.onKeyboardHeightChangeEventDetail>
|
|
152
152
|
}
|
package/types/Video.d.ts
CHANGED
|
@@ -2,16 +2,16 @@ import { ComponentType } from 'react'
|
|
|
2
2
|
import { StandardProps, CommonEventFunction } from './common'
|
|
3
3
|
interface VideoProps extends StandardProps {
|
|
4
4
|
/** 要播放视频的资源地址
|
|
5
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
5
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
6
6
|
*/
|
|
7
7
|
src: string
|
|
8
8
|
/** 指定视频时长
|
|
9
|
-
* @supported weapp, alipay, qq, h5, rn
|
|
9
|
+
* @supported weapp, alipay, qq, h5, rn, harmony
|
|
10
10
|
*/
|
|
11
11
|
duration?: number
|
|
12
12
|
/** 是否显示默认播放控件(播放/暂停按钮、播放进度、时间)
|
|
13
13
|
* @default true
|
|
14
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
14
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
15
15
|
*/
|
|
16
16
|
controls?: boolean
|
|
17
17
|
/** 弹幕列表
|
|
@@ -30,17 +30,17 @@ interface VideoProps extends StandardProps {
|
|
|
30
30
|
enableDanmu?: boolean
|
|
31
31
|
/** 是否自动播放
|
|
32
32
|
* @default false
|
|
33
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
33
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
34
34
|
*/
|
|
35
35
|
autoplay?: boolean
|
|
36
36
|
/** 是否循环播放
|
|
37
37
|
* @default false
|
|
38
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
38
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
39
39
|
*/
|
|
40
40
|
loop?: boolean
|
|
41
41
|
/** 是否静音播放
|
|
42
42
|
* @default false
|
|
43
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
43
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
44
44
|
*/
|
|
45
45
|
muted?: boolean
|
|
46
46
|
/** 指定视频初始播放位置
|
|
@@ -83,7 +83,7 @@ interface VideoProps extends StandardProps {
|
|
|
83
83
|
enableProgressGesture?: boolean
|
|
84
84
|
/** 当视频大小与 video 容器大小不一致时,视频的表现形式
|
|
85
85
|
* @default "contain"
|
|
86
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5
|
|
86
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, harmony
|
|
87
87
|
*/
|
|
88
88
|
objectFit?: keyof VideoProps.ObjectFit
|
|
89
89
|
/** 视频封面的图片网络资源地址,如果 controls 属性值为 false 则设置 poster 无效
|
|
@@ -298,24 +298,24 @@ interface VideoProps extends StandardProps {
|
|
|
298
298
|
*/
|
|
299
299
|
definition?: string
|
|
300
300
|
/** 当开始/继续播放时触发 play 事件
|
|
301
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
301
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
302
302
|
*/
|
|
303
303
|
onPlay?: CommonEventFunction
|
|
304
304
|
/** 当暂停播放时触发 pause 事件
|
|
305
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
305
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
306
306
|
*/
|
|
307
307
|
onPause?: CommonEventFunction
|
|
308
308
|
/** 当播放到末尾时触发 ended 事件
|
|
309
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
309
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
310
310
|
*/
|
|
311
311
|
onEnded?: CommonEventFunction
|
|
312
312
|
/** 播放进度变化时触发, 触发频率 250ms 一次
|
|
313
|
-
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
313
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
|
|
314
314
|
*/
|
|
315
315
|
onTimeUpdate?: CommonEventFunction<VideoProps.onTimeUpdateEventDetail>
|
|
316
316
|
/** 当视频进入和退出全屏时触发
|
|
317
317
|
*
|
|
318
|
-
* @supported alipay, h5, rn
|
|
318
|
+
* @supported alipay, h5, rn, harmony
|
|
319
319
|
*/
|
|
320
320
|
onFullscreenChange?: CommonEventFunction<VideoProps.onFullscreenChangeEventDetail>
|
|
321
321
|
/** 视频出现缓冲时触发
|
|
@@ -328,11 +328,11 @@ interface VideoProps extends StandardProps {
|
|
|
328
328
|
*/
|
|
329
329
|
onError?: CommonEventFunction
|
|
330
330
|
/** 加载进度变化时触发,只支持一段加载
|
|
331
|
-
* @supported weapp, tt, qq, h5
|
|
331
|
+
* @supported weapp, tt, qq, h5, harmony
|
|
332
332
|
*/
|
|
333
333
|
onProgress?: CommonEventFunction<VideoProps.onProgressEventDetail>
|
|
334
334
|
/** 视频元数据加载完成时触发
|
|
335
|
-
* @supported weapp, swan, tt, jd, rn
|
|
335
|
+
* @supported weapp, swan, tt, jd, rn, harmony
|
|
336
336
|
*/
|
|
337
337
|
onLoadedMetaData?: CommonEventFunction<VideoProps.onLoadedMetaDataEventDetail>
|
|
338
338
|
/**
|
|
@@ -433,11 +433,11 @@ interface VideoProps extends StandardProps {
|
|
|
433
433
|
*/
|
|
434
434
|
onLoadStart?: CommonEventFunction
|
|
435
435
|
/** 否
|
|
436
|
-
* @supported jd
|
|
436
|
+
* @supported jd, harmony
|
|
437
437
|
*/
|
|
438
438
|
onSeeked?: CommonEventFunction
|
|
439
439
|
/** 否
|
|
440
|
-
* @supported jd
|
|
440
|
+
* @supported jd, harmony
|
|
441
441
|
*/
|
|
442
442
|
onSeeking?: CommonEventFunction
|
|
443
443
|
/** 贴片广告加载成功时触发,event.detail = { adType: 'preRollAd' | 'postRollAd' }
|