@tarojs/components 3.5.5 → 3.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/taro-input-core.cjs.entry.js +24 -3
- package/dist/cjs/taro-video-control_3.cjs.entry.js +21 -3
- package/dist/collection/components/input/input.js +24 -3
- package/dist/collection/components/video/video.js +23 -3
- package/dist/collection/utils/json-schema-to-types.js +224 -0
- package/dist/esm/taro-input-core.entry.js +24 -3
- package/dist/esm/taro-video-control_3.entry.js +21 -3
- package/dist/esm-es5/taro-input-core.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
- package/dist/taro-components/p-0380841f.system.js +1 -1
- package/dist/taro-components/p-232ebfae.system.entry.js +1 -0
- package/dist/taro-components/{p-7e8943d8.entry.js → p-3744e978.entry.js} +1 -1
- package/dist/taro-components/p-56c86512.entry.js +1 -0
- package/dist/taro-components/{p-ed8c1bb8.system.entry.js → p-f81a74bb.system.entry.js} +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/input/input.d.ts +1 -0
- package/dist/types/utils/json-schema-to-types.d.ts +25 -0
- package/dist-h5/react/components/index.js +5 -5
- package/package.json +9 -5
- package/types/Ad.d.ts +99 -9
- package/types/AdCustom.d.ts +1 -3
- package/types/Audio.d.ts +16 -16
- package/types/Block.d.ts +0 -2
- package/types/Button.d.ts +187 -47
- package/types/Camera.d.ts +20 -18
- package/types/Canvas.d.ts +52 -13
- package/types/Checkbox.d.ts +13 -10
- package/types/CheckboxGroup.d.ts +5 -7
- package/types/CoverImage.d.ts +44 -5
- package/types/CoverView.d.ts +34 -10
- package/types/Editor.d.ts +4 -6
- package/types/Form.d.ts +23 -7
- package/types/FunctionalPageNavigator.d.ts +5 -3
- package/types/Icon.d.ts +19 -7
- package/types/Image.d.ts +71 -14
- package/types/Input.d.ts +44 -33
- package/types/Label.d.ts +0 -3
- package/types/LivePlayer.d.ts +80 -24
- package/types/LivePusher.d.ts +78 -37
- package/types/Map.d.ts +208 -66
- package/types/MatchMedia.d.ts +8 -10
- package/types/MovableArea.d.ts +1 -3
- package/types/MovableView.d.ts +88 -30
- package/types/NavigationBar.d.ts +0 -2
- package/types/Navigator.d.ts +35 -18
- package/types/OfficialAccount.d.ts +10 -3
- package/types/OpenData.d.ts +35 -6
- package/types/PageContainer.d.ts +13 -10
- package/types/PageMeta.d.ts +27 -13
- package/types/Picker.d.ts +50 -14
- package/types/PickerView.d.ts +31 -13
- package/types/PickerViewColumn.d.ts +0 -2
- package/types/Progress.d.ts +17 -14
- package/types/Radio.d.ts +16 -6
- package/types/RadioGroup.d.ts +6 -4
- package/types/RichText.d.ts +53 -5
- package/types/RootPortal.d.ts +2 -1
- package/types/ScrollView.d.ts +82 -19
- package/types/ShareElement.d.ts +5 -7
- package/types/Slider.d.ts +41 -17
- package/types/Swiper.d.ts +100 -22
- package/types/SwiperItem.d.ts +6 -3
- package/types/Switch.d.ts +22 -8
- package/types/Text.d.ts +10 -6
- package/types/Textarea.d.ts +61 -28
- package/types/Video.d.ts +331 -50
- package/types/View.d.ts +122 -9
- package/types/VoipRoom.d.ts +6 -9
- package/types/WebView.d.ts +9 -7
- package/types/common.d.ts +1 -1
- package/types/index.vue3.d.ts +261 -138
- package/dist/taro-components/p-1b356f4d.entry.js +0 -1
- package/dist/taro-components/p-a39276ff.system.entry.js +0 -1
package/types/PageMeta.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps, CommonEventFunction } from './common'
|
|
3
|
-
|
|
4
3
|
interface PageMetaProps extends StandardProps {
|
|
5
4
|
/** 下拉背景字体、loading 图的样式,仅支持 dark 和 light
|
|
6
5
|
* @supported weapp
|
|
@@ -8,51 +7,51 @@ interface PageMetaProps extends StandardProps {
|
|
|
8
7
|
backgroundTextStyle?: string
|
|
9
8
|
|
|
10
9
|
/** 窗口的背景色,必须为十六进制颜色值
|
|
11
|
-
* @supported weapp
|
|
10
|
+
* @supported weapp, alipay
|
|
12
11
|
*/
|
|
13
12
|
backgroundColor?: string
|
|
14
13
|
|
|
15
14
|
/** 顶部窗口的背景色,必须为十六进制颜色值,仅 iOS 支持
|
|
16
|
-
* @supported weapp
|
|
15
|
+
* @supported weapp, alipay
|
|
17
16
|
*/
|
|
18
17
|
backgroundColorTop?: string
|
|
19
18
|
|
|
20
19
|
/** 底部窗口的背景色,必须为十六进制颜色值,仅 iOS 支持
|
|
21
|
-
* @supported weapp
|
|
20
|
+
* @supported weapp, alipay
|
|
22
21
|
*/
|
|
23
22
|
backgroundColorBottom?: string
|
|
24
23
|
|
|
25
24
|
/** 滚动位置,可以使用 px 或者 rpx 为单位,在被设置时,页面会滚动到对应位置
|
|
26
25
|
* @default ""
|
|
27
|
-
* @supported weapp
|
|
26
|
+
* @supported weapp, alipay
|
|
28
27
|
*/
|
|
29
28
|
scrollTop?: string
|
|
30
29
|
|
|
31
30
|
/** 滚动动画时长
|
|
32
31
|
* @default 300
|
|
33
|
-
* @supported weapp
|
|
32
|
+
* @supported weapp, alipay
|
|
34
33
|
*/
|
|
35
34
|
scrollDuration?: number
|
|
36
35
|
|
|
37
36
|
/** 页面根节点样式,页面根节点是所有页面节点的祖先节点,相当于 HTML 中的 body 节点
|
|
38
37
|
* @default ""
|
|
39
|
-
* @supported weapp
|
|
38
|
+
* @supported weapp, alipay
|
|
40
39
|
*/
|
|
41
40
|
pageStyle?: string
|
|
42
41
|
|
|
43
42
|
/** 页面的根字体大小,页面中的所有 rem 单位,将使用这个字体大小作为参考值,即 1rem 等于这个字体大小
|
|
44
43
|
* @default ""
|
|
45
|
-
* @supported weapp
|
|
44
|
+
* @supported weapp, alipay
|
|
46
45
|
*/
|
|
47
46
|
rootFontSize?: string
|
|
48
47
|
|
|
49
|
-
/** 页面尺寸变化时会触发 resize
|
|
48
|
+
/** 页面尺寸变化时会触发 resize 事件
|
|
50
49
|
* @supported weapp
|
|
51
50
|
*/
|
|
52
51
|
onResize?: CommonEventFunction<PageMetaProps.onResizeEventDetail>
|
|
53
52
|
|
|
54
|
-
/** 页面滚动时会触发 scroll
|
|
55
|
-
* @supported weapp
|
|
53
|
+
/** 页面滚动时会触发 scroll 事件
|
|
54
|
+
* @supported weapp, alipay
|
|
56
55
|
*/
|
|
57
56
|
onScroll?: CommonEventFunction<PageMetaProps.onScrollEventDetail>
|
|
58
57
|
|
|
@@ -60,17 +59,33 @@ interface PageMetaProps extends StandardProps {
|
|
|
60
59
|
* @supported weapp
|
|
61
60
|
*/
|
|
62
61
|
onScrollDone?: CommonEventFunction
|
|
63
|
-
}
|
|
64
62
|
|
|
63
|
+
/** 页面内容的背景色,用于页面中的空白部分和页面大小变化 resize 动画期间的临时空闲区域
|
|
64
|
+
* @supported weapp, alipay
|
|
65
|
+
*/
|
|
66
|
+
rootBackgroundColor?: string
|
|
67
|
+
|
|
68
|
+
/** 页面 page 的字体大小,可以设置为 system ,表示使用当前用户设置的微信字体大小
|
|
69
|
+
* @supported weapp, alipay
|
|
70
|
+
*/
|
|
71
|
+
pageFontSize?: string
|
|
72
|
+
|
|
73
|
+
/** 页面的方向,可为 auto portrait 或 landscape
|
|
74
|
+
* @supported weapp
|
|
75
|
+
*/
|
|
76
|
+
pageOrientation?: string
|
|
77
|
+
}
|
|
65
78
|
declare namespace PageMetaProps {
|
|
66
79
|
interface onResizeEventDetail {
|
|
67
80
|
/** 窗口尺寸 */
|
|
68
81
|
size: resizeType
|
|
69
82
|
}
|
|
83
|
+
|
|
70
84
|
/** 窗口尺寸类型 */
|
|
71
85
|
interface resizeType {
|
|
72
86
|
/** 窗口宽度 */
|
|
73
87
|
windowWidth: number
|
|
88
|
+
|
|
74
89
|
/** 窗口高度 */
|
|
75
90
|
windowHeight: number
|
|
76
91
|
}
|
|
@@ -85,5 +100,4 @@ declare namespace PageMetaProps {
|
|
|
85
100
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/page-meta.html
|
|
86
101
|
*/
|
|
87
102
|
declare const PageMeta: ComponentType<PageMetaProps>
|
|
88
|
-
|
|
89
103
|
export { PageMeta, PageMetaProps }
|
package/types/Picker.d.ts
CHANGED
|
@@ -10,30 +10,35 @@ interface PickerStandardProps extends StandardProps, FormItemProps {
|
|
|
10
10
|
* @supported weapp, h5, rn
|
|
11
11
|
*/
|
|
12
12
|
mode?: keyof PickerStandardProps.Mode
|
|
13
|
+
|
|
13
14
|
/**
|
|
14
15
|
* 是否禁用
|
|
15
16
|
* @default false
|
|
16
17
|
* @supported weapp, h5, rn
|
|
17
18
|
*/
|
|
18
19
|
disabled?: boolean
|
|
20
|
+
|
|
19
21
|
/**
|
|
20
22
|
* 取消选择或点遮罩层收起 picker 时触发
|
|
21
23
|
* @supported weapp, h5, rn
|
|
22
24
|
*/
|
|
23
25
|
onCancel?: CommonEventFunction
|
|
24
26
|
}
|
|
25
|
-
|
|
26
27
|
declare namespace PickerStandardProps {
|
|
27
28
|
/** 选择器类型 */
|
|
28
29
|
interface Mode {
|
|
29
30
|
/** 普通选择器 */
|
|
30
31
|
selector
|
|
32
|
+
|
|
31
33
|
/** 多列选择器 */
|
|
32
34
|
multiSelector
|
|
35
|
+
|
|
33
36
|
/** 时间选择器 */
|
|
34
37
|
time
|
|
38
|
+
|
|
35
39
|
/** 日期选择器 */
|
|
36
40
|
date
|
|
41
|
+
|
|
37
42
|
/** 省市区选择器 */
|
|
38
43
|
region
|
|
39
44
|
}
|
|
@@ -43,42 +48,47 @@ declare namespace PickerStandardProps {
|
|
|
43
48
|
interface PickerSelectorProps extends PickerStandardProps {
|
|
44
49
|
/** 选择器类型 */
|
|
45
50
|
mode?: 'selector'
|
|
51
|
+
|
|
46
52
|
/**
|
|
47
53
|
* mode为 selector 或 multiSelector 时,range 有效
|
|
48
54
|
* @supported weapp, h5, rn
|
|
49
55
|
* @default []
|
|
50
56
|
*/
|
|
51
57
|
range: string[] | number[] | Record<string, any>[]
|
|
58
|
+
|
|
52
59
|
/**
|
|
53
60
|
* 当 range 是一个 Object Array 时,通过 rangeKey 来指定 Object 中 key 的值作为选择器显示内容
|
|
54
61
|
* @supported weapp, h5, rn
|
|
55
62
|
*/
|
|
56
63
|
rangeKey?: string
|
|
64
|
+
|
|
57
65
|
/**
|
|
58
66
|
* 表示选择了 range 中的第几个(下标从 0 开始)
|
|
59
67
|
* @supported weapp, h5, rn
|
|
60
68
|
* @default 0
|
|
61
69
|
*/
|
|
62
70
|
value?: number
|
|
71
|
+
|
|
63
72
|
/**
|
|
64
73
|
* mode为 selector 或 multiSelector 时 itemStyle 有效
|
|
65
74
|
* @supported rn
|
|
66
75
|
* @default {}
|
|
67
76
|
*/
|
|
68
77
|
itemStyle?: StyleProp<TextStyle>
|
|
78
|
+
|
|
69
79
|
/**
|
|
70
80
|
* mode为 selector 或 multiSelector 时 indicatorStyle 有效
|
|
71
81
|
* @supported rn
|
|
72
82
|
* @default {}
|
|
73
83
|
*/
|
|
74
84
|
indicatorStyle?: StyleProp<ViewStyle>
|
|
85
|
+
|
|
75
86
|
/**
|
|
76
|
-
* value 改变时触发 change
|
|
87
|
+
* value 改变时触发 change 事件
|
|
77
88
|
* @supported weapp, h5, rn
|
|
78
89
|
*/
|
|
79
90
|
onChange: CommonEventFunction<PickerSelectorProps.ChangeEventDetail>
|
|
80
91
|
}
|
|
81
|
-
|
|
82
92
|
declare namespace PickerSelectorProps {
|
|
83
93
|
interface ChangeEventDetail {
|
|
84
94
|
/** 表示变更值的下标 */
|
|
@@ -90,47 +100,53 @@ declare namespace PickerSelectorProps {
|
|
|
90
100
|
interface PickerMultiSelectorProps extends PickerStandardProps {
|
|
91
101
|
/** 选择器类型 */
|
|
92
102
|
mode: 'multiSelector'
|
|
103
|
+
|
|
93
104
|
/**
|
|
94
105
|
* mode为 selector 或 multiSelector 时,range 有效
|
|
95
106
|
* @supported weapp, h5, rn
|
|
96
107
|
* @default []
|
|
97
108
|
*/
|
|
98
109
|
range: Array<string[]> | Array<number[]> | Array<Record<string, any>[]>
|
|
110
|
+
|
|
99
111
|
/**
|
|
100
112
|
* 当 range 是一个 Object Array 时,通过 rangeKey 来指定 Object 中 key 的值作为选择器显示内容
|
|
101
113
|
* @supported weapp, h5, rn
|
|
102
114
|
*/
|
|
103
115
|
rangeKey?: string
|
|
116
|
+
|
|
104
117
|
/**
|
|
105
118
|
* 表示选择了 range 中的第几个(下标从 0 开始)
|
|
106
119
|
* @supported weapp, h5, rn
|
|
107
120
|
* @default []
|
|
108
121
|
*/
|
|
109
122
|
value: number[] | string[] | Record<string, any>[]
|
|
123
|
+
|
|
110
124
|
/**
|
|
111
125
|
* mode为 selector 或 multiSelector 时 itemStyle 有效
|
|
112
126
|
* @supported rn
|
|
113
127
|
* @default {}
|
|
114
128
|
*/
|
|
115
129
|
itemStyle?: StyleProp<TextStyle>
|
|
130
|
+
|
|
116
131
|
/**
|
|
117
132
|
* mode为 selector 或 multiSelector 时 indicatorStyle 有效
|
|
118
133
|
* @supported rn
|
|
119
134
|
* @default {}
|
|
120
135
|
*/
|
|
121
136
|
indicatorStyle?: StyleProp<ViewStyle>
|
|
137
|
+
|
|
122
138
|
/**
|
|
123
|
-
* 当 value 改变时触发 change
|
|
139
|
+
* 当 value 改变时触发 change 事件
|
|
124
140
|
* @supported weapp, h5, rn
|
|
125
141
|
*/
|
|
126
142
|
onChange: CommonEventFunction<PickerMultiSelectorProps.ChangeEventDetail>
|
|
143
|
+
|
|
127
144
|
/**
|
|
128
145
|
* 列改变时触发
|
|
129
146
|
* @supported weapp, h5, rn
|
|
130
147
|
*/
|
|
131
148
|
onColumnChange?: CommonEventFunction<PickerMultiSelectorProps.ColumnChangeEventDetail>
|
|
132
149
|
}
|
|
133
|
-
|
|
134
150
|
declare namespace PickerMultiSelectorProps {
|
|
135
151
|
interface ChangeEventDetail {
|
|
136
152
|
/** 表示变更值的下标 */
|
|
@@ -139,6 +155,7 @@ declare namespace PickerMultiSelectorProps {
|
|
|
139
155
|
interface ColumnChangeEventDetail {
|
|
140
156
|
/** 表示改变了第几列(下标从0开始) */
|
|
141
157
|
column: number
|
|
158
|
+
|
|
142
159
|
/** 表示变更值的下标 */
|
|
143
160
|
value: number
|
|
144
161
|
}
|
|
@@ -148,28 +165,31 @@ declare namespace PickerMultiSelectorProps {
|
|
|
148
165
|
interface PickerTimeProps extends PickerStandardProps {
|
|
149
166
|
/** 选择器类型 */
|
|
150
167
|
mode: 'time'
|
|
168
|
+
|
|
151
169
|
/**
|
|
152
170
|
* value 的值表示选择了 range 中的第几个(下标从 0 开始)
|
|
153
171
|
* @supported weapp, h5, rn
|
|
154
172
|
*/
|
|
155
173
|
value: string
|
|
174
|
+
|
|
156
175
|
/**
|
|
157
176
|
* 仅当 mode = time|date 时有效,表示有效时间范围的开始,字符串格式为"hh:mm"
|
|
158
177
|
* @supported weapp, h5, rn
|
|
159
178
|
*/
|
|
160
179
|
start?: string
|
|
180
|
+
|
|
161
181
|
/**
|
|
162
182
|
* 仅当 mode = time|date 时有效,表示有效时间范围的结束,字符串格式为"hh:mm"
|
|
163
183
|
* @supported weapp, h5, rn
|
|
164
184
|
*/
|
|
165
185
|
end?: string
|
|
186
|
+
|
|
166
187
|
/**
|
|
167
|
-
* value 改变时触发 change
|
|
188
|
+
* value 改变时触发 change 事件
|
|
168
189
|
* @supported weapp, h5, rn
|
|
169
190
|
*/
|
|
170
191
|
onChange: CommonEventFunction<PickerTimeProps.ChangeEventDetail>
|
|
171
192
|
}
|
|
172
|
-
|
|
173
193
|
declare namespace PickerTimeProps {
|
|
174
194
|
interface ChangeEventDetail {
|
|
175
195
|
/** 表示选中的时间 */
|
|
@@ -181,41 +201,47 @@ declare namespace PickerTimeProps {
|
|
|
181
201
|
interface PickerDateProps extends PickerStandardProps {
|
|
182
202
|
/** 选择器类型 */
|
|
183
203
|
mode: 'date'
|
|
204
|
+
|
|
184
205
|
/**
|
|
185
206
|
* 表示选中的日期,格式为"YYYY-MM-DD"
|
|
186
207
|
* @supported weapp, h5, rn
|
|
187
208
|
* @default 0
|
|
188
209
|
*/
|
|
189
210
|
value: string
|
|
211
|
+
|
|
190
212
|
/**
|
|
191
213
|
* 仅当 mode = time|date 时有效,表示有效时间范围的开始,字符串格式为"hh:mm"
|
|
192
214
|
* @supported weapp, h5, rn
|
|
193
215
|
*/
|
|
194
216
|
start?: string
|
|
217
|
+
|
|
195
218
|
/**
|
|
196
219
|
* 仅当 mode = time|date 时有效,表示有效时间范围的结束,字符串格式为"hh:mm"
|
|
197
220
|
* @supported weapp, h5, rn
|
|
198
221
|
*/
|
|
199
222
|
end?: string
|
|
223
|
+
|
|
200
224
|
/**
|
|
201
225
|
* 有效值 year, month, day,表示选择器的粒度
|
|
202
226
|
* @supported weapp, h5, rn
|
|
203
227
|
* @default "day"
|
|
204
228
|
*/
|
|
205
229
|
fields?: keyof PickerDateProps.Fields
|
|
230
|
+
|
|
206
231
|
/**
|
|
207
|
-
* value 改变时触发 change
|
|
232
|
+
* value 改变时触发 change 事件
|
|
208
233
|
* @supported weapp, h5, rn
|
|
209
234
|
*/
|
|
210
235
|
onChange: CommonEventFunction<PickerDateProps.ChangeEventDetail>
|
|
211
236
|
}
|
|
212
|
-
|
|
213
237
|
declare namespace PickerDateProps {
|
|
214
238
|
interface Fields {
|
|
215
239
|
/** 选择器粒度为年 */
|
|
216
240
|
year
|
|
241
|
+
|
|
217
242
|
/** 选择器粒度为月份 */
|
|
218
243
|
month
|
|
244
|
+
|
|
219
245
|
/** 选择器粒度为天 */
|
|
220
246
|
day
|
|
221
247
|
}
|
|
@@ -229,35 +255,40 @@ declare namespace PickerDateProps {
|
|
|
229
255
|
interface PickerRegionProps extends PickerStandardProps {
|
|
230
256
|
/** 选择器类型 */
|
|
231
257
|
mode: 'region'
|
|
258
|
+
|
|
232
259
|
/**
|
|
233
260
|
* 表示选中的省市区,默认选中每一列的第一个值
|
|
234
261
|
* @supported weapp, h5, rn
|
|
235
262
|
* @default []
|
|
236
263
|
*/
|
|
237
264
|
value: string[]
|
|
265
|
+
|
|
238
266
|
/**
|
|
239
267
|
* 可为每一列的顶部添加一个自定义的项
|
|
240
268
|
* @supported weapp, h5, rn
|
|
241
269
|
*/
|
|
242
270
|
customItem?: string
|
|
271
|
+
|
|
243
272
|
/**
|
|
244
273
|
* 自定义省市区数据
|
|
245
274
|
* @supported rn
|
|
246
275
|
*/
|
|
247
276
|
regionData?: PickerRegionProps.RegionData[]
|
|
277
|
+
|
|
248
278
|
/**
|
|
249
|
-
* value 改变时触发 change
|
|
279
|
+
* value 改变时触发 change 事件
|
|
250
280
|
* @supported weapp, h5, rn
|
|
251
281
|
*/
|
|
252
282
|
onChange: CommonEventFunction<PickerRegionProps.ChangeEventDetail>
|
|
253
283
|
}
|
|
254
|
-
|
|
255
284
|
declare namespace PickerRegionProps {
|
|
256
285
|
interface ChangeEventDetail {
|
|
257
286
|
/** 表示选中的省市区 */
|
|
258
287
|
value: string[]
|
|
288
|
+
|
|
259
289
|
/** 统计用区划代码 */
|
|
260
290
|
code: string[]
|
|
291
|
+
|
|
261
292
|
/** 邮政编码 */
|
|
262
293
|
postcode?: string
|
|
263
294
|
}
|
|
@@ -404,8 +435,13 @@ declare namespace PickerRegionProps {
|
|
|
404
435
|
* ```
|
|
405
436
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/picker.html
|
|
406
437
|
*/
|
|
407
|
-
declare const Picker: ComponentType<
|
|
408
|
-
|
|
438
|
+
declare const Picker: ComponentType<
|
|
439
|
+
| PickerMultiSelectorProps
|
|
440
|
+
| PickerTimeProps
|
|
441
|
+
| PickerDateProps
|
|
442
|
+
| PickerRegionProps
|
|
443
|
+
| PickerSelectorProps
|
|
444
|
+
>
|
|
409
445
|
export {
|
|
410
446
|
Picker,
|
|
411
447
|
PickerStandardProps,
|
|
@@ -413,5 +449,5 @@ export {
|
|
|
413
449
|
PickerMultiSelectorProps,
|
|
414
450
|
PickerTimeProps,
|
|
415
451
|
PickerDateProps,
|
|
416
|
-
PickerRegionProps
|
|
452
|
+
PickerRegionProps,
|
|
417
453
|
}
|
package/types/PickerView.d.ts
CHANGED
|
@@ -1,55 +1,74 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps, CommonEventFunction } from './common'
|
|
3
|
-
|
|
4
3
|
interface PickerViewProps extends StandardProps {
|
|
5
|
-
|
|
6
4
|
/** 数组中的数字依次表示 picker-view 内的 picker-view-column 选择的第几项(下标从 0 开始),数字大于 picker-view-column 可选项长度时,选择最后一项。
|
|
7
|
-
* @supported weapp,
|
|
5
|
+
* @supported weapp, alipay, swan, tt, qq, jd, rn
|
|
8
6
|
*/
|
|
9
7
|
value?: number[]
|
|
10
8
|
|
|
11
9
|
/** 设置选择器中间选中框的样式
|
|
12
|
-
* @supported weapp,
|
|
10
|
+
* @supported weapp, alipay, swan, tt, qq, jd, rn
|
|
13
11
|
*/
|
|
14
12
|
indicatorStyle?: string
|
|
15
13
|
|
|
16
14
|
/** 设置选择器中间选中框的类名
|
|
17
|
-
* @supported weapp, swan,
|
|
15
|
+
* @supported weapp, alipay, swan, tt, qq, jd
|
|
18
16
|
*/
|
|
19
17
|
indicatorClass?: string
|
|
20
18
|
|
|
21
19
|
/** 设置蒙层的样式
|
|
22
|
-
* @supported weapp, swan,
|
|
20
|
+
* @supported weapp, alipay, swan, tt, qq, jd
|
|
23
21
|
*/
|
|
24
22
|
maskStyle?: string
|
|
25
23
|
|
|
26
24
|
/** 设置蒙层的类名
|
|
27
|
-
* @supported weapp, swan,
|
|
25
|
+
* @supported weapp, alipay, swan, tt, qq, jd
|
|
28
26
|
*/
|
|
29
27
|
maskClass?: string
|
|
30
28
|
|
|
31
29
|
/** 是否在手指松开时立即触发 change 事件。若不开启则会在滚动动画结束后触发 change 事件。
|
|
32
|
-
* @supported weapp
|
|
30
|
+
* @supported weapp, tt
|
|
33
31
|
* @default false
|
|
34
32
|
*/
|
|
35
33
|
immediateChange?: boolean
|
|
36
34
|
|
|
37
35
|
/** 当滚动选择,value 改变时触发 change 事件,event.detail = {value: value};value为数组,表示 picker-view 内的 picker-view-column 当前选择的是第几项(下标从 0 开始)
|
|
38
|
-
* @supported weapp,
|
|
36
|
+
* @supported weapp, alipay, swan, tt, qq, jd, rn
|
|
39
37
|
*/
|
|
40
38
|
onChange?: CommonEventFunction<PickerViewProps.onChangeEventDetail>
|
|
41
39
|
|
|
42
40
|
/** 当滚动选择开始时候触发事件
|
|
43
|
-
* @supported weapp
|
|
41
|
+
* @supported weapp, tt, qq
|
|
44
42
|
*/
|
|
45
43
|
onPickStart?: CommonEventFunction
|
|
46
44
|
|
|
47
45
|
/** 当滚动选择结束时候触发事件
|
|
48
|
-
* @supported weapp
|
|
46
|
+
* @supported weapp, tt, qq
|
|
49
47
|
*/
|
|
50
48
|
onPickEnd?: CommonEventFunction
|
|
51
|
-
}
|
|
52
49
|
|
|
50
|
+
/** 选择器标题,建议标题控制在 12 个中文汉字长度内,避免出现截断现象, 截断部分将以 ... 形式展示
|
|
51
|
+
* @supported swan
|
|
52
|
+
*/
|
|
53
|
+
title?: string
|
|
54
|
+
|
|
55
|
+
/** 无障碍访问,(属性)元素的额外描述
|
|
56
|
+
* @supported qq
|
|
57
|
+
*/
|
|
58
|
+
ariaLabel?: string
|
|
59
|
+
|
|
60
|
+
/** 当滚动选择开始时候触发事件。
|
|
61
|
+
* 版本要求: 基础库 2.7.23 及以上
|
|
62
|
+
* @supported alipay
|
|
63
|
+
*/
|
|
64
|
+
onPickerStart?: CommonEventFunction
|
|
65
|
+
|
|
66
|
+
/** 当滚动选择结束时候触发事件。
|
|
67
|
+
* 版本要求: 基础库 2.7.23 及以上
|
|
68
|
+
* @supported alipay
|
|
69
|
+
*/
|
|
70
|
+
onPickerEnd?: CommonEventFunction
|
|
71
|
+
}
|
|
53
72
|
declare namespace PickerViewProps {
|
|
54
73
|
interface onChangeEventDetail {
|
|
55
74
|
value: number[]
|
|
@@ -194,5 +213,4 @@ declare namespace PickerViewProps {
|
|
|
194
213
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/picker-view.html
|
|
195
214
|
*/
|
|
196
215
|
declare const PickerView: ComponentType<PickerViewProps>
|
|
197
|
-
|
|
198
216
|
export { PickerView, PickerViewProps }
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps } from './common'
|
|
3
|
-
|
|
4
3
|
type PickerViewColumnProps = StandardProps
|
|
5
4
|
|
|
6
5
|
/** 滚动选择器子项
|
|
@@ -10,5 +9,4 @@ type PickerViewColumnProps = StandardProps
|
|
|
10
9
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/picker-view-column.html
|
|
11
10
|
*/
|
|
12
11
|
declare const PickerViewColumn: ComponentType<StandardProps>
|
|
13
|
-
|
|
14
12
|
export { PickerViewColumn, PickerViewColumnProps }
|
package/types/Progress.d.ts
CHANGED
|
@@ -1,57 +1,56 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps, CommonEventFunction } from './common'
|
|
3
|
-
|
|
4
3
|
interface ProgressProps extends StandardProps {
|
|
5
4
|
/** 百分比 0~100
|
|
6
|
-
* @supported weapp,
|
|
5
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
7
6
|
*/
|
|
8
7
|
percent?: number
|
|
9
8
|
|
|
10
9
|
/** 在进度条右侧显示百分比
|
|
11
10
|
* @default false
|
|
12
|
-
* @supported weapp, swan,
|
|
11
|
+
* @supported weapp, alipay, swan, qq, jd, h5, rn
|
|
13
12
|
*/
|
|
14
13
|
showInfo?: boolean
|
|
15
14
|
|
|
16
15
|
/** 圆角大小
|
|
17
16
|
* @default 0
|
|
18
|
-
* @supported weapp, h5
|
|
17
|
+
* @supported weapp, swan, qq, jd, h5
|
|
19
18
|
*/
|
|
20
19
|
borderRadius?: number | string
|
|
21
20
|
|
|
22
21
|
/** 右侧百分比字体大小
|
|
23
22
|
* @default 16
|
|
24
|
-
* @supported weapp, h5
|
|
23
|
+
* @supported weapp, swan, qq, jd, h5
|
|
25
24
|
*/
|
|
26
25
|
fontSize?: number | string
|
|
27
26
|
|
|
28
27
|
/** 进度条线的宽度
|
|
29
28
|
* @default 6
|
|
30
|
-
* @supported weapp,
|
|
29
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
31
30
|
*/
|
|
32
31
|
strokeWidth?: number | string
|
|
33
32
|
|
|
34
33
|
/** 进度条颜色 (请使用 activeColor)
|
|
35
34
|
* @default "#09BB07"
|
|
36
|
-
* @supported weapp, swan,
|
|
35
|
+
* @supported weapp, swan, qq, jd, h5
|
|
37
36
|
*/
|
|
38
37
|
color?: string
|
|
39
38
|
|
|
40
39
|
/** 已选择的进度条的颜色
|
|
41
40
|
* @default "#09BB07"
|
|
42
|
-
* @supported weapp,
|
|
41
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
43
42
|
*/
|
|
44
43
|
activeColor?: string
|
|
45
44
|
|
|
46
45
|
/** 未选择的进度条的颜色
|
|
47
46
|
* @default "#EBEBEB"
|
|
48
|
-
* @supported weapp,
|
|
47
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
49
48
|
*/
|
|
50
49
|
backgroundColor?: string
|
|
51
50
|
|
|
52
51
|
/** 进度条从左往右的动画
|
|
53
52
|
* @default false
|
|
54
|
-
* @supported weapp,
|
|
53
|
+
* @supported weapp, alipay, swan, tt, qq, jd, h5, rn
|
|
55
54
|
*/
|
|
56
55
|
active?: boolean
|
|
57
56
|
|
|
@@ -59,20 +58,25 @@ interface ProgressProps extends StandardProps {
|
|
|
59
58
|
*
|
|
60
59
|
* forwards: 动画从上次结束点接着播
|
|
61
60
|
* @default backwards
|
|
62
|
-
* @supported weapp, swan, tt,
|
|
61
|
+
* @supported weapp, swan, tt, qq, jd, h5, rn
|
|
63
62
|
*/
|
|
64
63
|
activeMode?: 'backwards' | 'forwards'
|
|
65
64
|
|
|
66
65
|
/** 进度增加 1% 所需毫秒数
|
|
67
66
|
* @default 30
|
|
68
|
-
* @supported weapp, h5
|
|
67
|
+
* @supported weapp, swan, jd, h5
|
|
69
68
|
*/
|
|
70
69
|
duration?: number
|
|
71
70
|
|
|
72
71
|
/** 动画完成事件
|
|
73
|
-
* @supported weapp, h5
|
|
72
|
+
* @supported weapp, qq, jd, h5
|
|
74
73
|
*/
|
|
75
74
|
onActiveEnd?: CommonEventFunction
|
|
75
|
+
|
|
76
|
+
/** 无障碍访问,(属性)元素的额外描述
|
|
77
|
+
* @supported qq
|
|
78
|
+
*/
|
|
79
|
+
ariaLabel?: string
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
/** 进度条。组件属性的长度单位默认为 px
|
|
@@ -111,5 +115,4 @@ interface ProgressProps extends StandardProps {
|
|
|
111
115
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/progress.html
|
|
112
116
|
*/
|
|
113
117
|
declare const Progress: ComponentType<ProgressProps>
|
|
114
|
-
|
|
115
118
|
export { Progress, ProgressProps }
|
package/types/Radio.d.ts
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
3
|
-
|
|
4
3
|
interface RadioProps extends StandardProps {
|
|
5
4
|
/** `<Radio/>` 标识。当该`<Radio/>` 选中时,`<RadioGroup/>`的 change 事件会携带`<Radio/>`的 value
|
|
6
|
-
* @supported weapp,
|
|
5
|
+
* @supported weapp, alipay, swan, tt, qq, rn
|
|
7
6
|
*/
|
|
8
7
|
value?: string
|
|
9
8
|
|
|
10
9
|
/** 当前是否选中
|
|
11
10
|
* @default false
|
|
12
|
-
* @supported weapp,
|
|
11
|
+
* @supported weapp, alipay, swan, tt, qq, h5, rn
|
|
13
12
|
*/
|
|
14
13
|
checked?: boolean
|
|
15
14
|
|
|
16
15
|
/** 是否禁用
|
|
17
16
|
* @default false
|
|
18
|
-
* @supported weapp,
|
|
17
|
+
* @supported weapp, alipay, swan, tt, qq, h5, rn
|
|
19
18
|
*/
|
|
20
19
|
disabled?: boolean
|
|
21
20
|
|
|
22
21
|
/** Radio 的颜色,同 css 的 color
|
|
23
22
|
* @default "#09BB07"
|
|
24
|
-
* @supported weapp,
|
|
23
|
+
* @supported weapp, alipay, swan, tt, qq, rn
|
|
25
24
|
*/
|
|
26
25
|
color?: string
|
|
27
26
|
|
|
@@ -29,6 +28,18 @@ interface RadioProps extends StandardProps {
|
|
|
29
28
|
* @supported h5
|
|
30
29
|
*/
|
|
31
30
|
nativeProps?: Record<string, unknown>
|
|
31
|
+
|
|
32
|
+
/** 无障碍访问,(属性)元素的额外描述
|
|
33
|
+
* @supported qq
|
|
34
|
+
*/
|
|
35
|
+
ariaLabel?: string
|
|
36
|
+
|
|
37
|
+
/** <radio-group/> 中的选中项发生变化时触发 change 事件,event.detail = {value: 选中项radio的value}
|
|
38
|
+
* @supported jd
|
|
39
|
+
*/
|
|
40
|
+
onChange?: CommonEventFunction<{
|
|
41
|
+
value?: string
|
|
42
|
+
}>
|
|
32
43
|
}
|
|
33
44
|
|
|
34
45
|
/** 单选项目
|
|
@@ -175,5 +186,4 @@ interface RadioProps extends StandardProps {
|
|
|
175
186
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/radio.html
|
|
176
187
|
*/
|
|
177
188
|
declare const Radio: ComponentType<RadioProps>
|
|
178
|
-
|
|
179
189
|
export { Radio, RadioProps }
|
package/types/RadioGroup.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps, CommonEventFunction, FormItemProps } from './common'
|
|
3
|
-
|
|
4
3
|
interface RadioGroupProps extends StandardProps, FormItemProps {
|
|
5
4
|
/** RadioGroup 中选中项发生改变时触发 change 事件,detail = {value:[选中的radio的value的数组]}
|
|
6
|
-
* @supported weapp,
|
|
5
|
+
* @supported weapp, alipay, swan, tt, qq, h5
|
|
7
6
|
*/
|
|
8
7
|
onChange?: CommonEventFunction
|
|
9
|
-
}
|
|
10
8
|
|
|
9
|
+
/** 组件名字,用于表单提交获取数据。
|
|
10
|
+
* @supported alipay, tt
|
|
11
|
+
*/
|
|
12
|
+
name?: string
|
|
13
|
+
}
|
|
11
14
|
declare namespace RadioGroupProps {
|
|
12
15
|
interface onChangeEventDetail {
|
|
13
16
|
value: string[]
|
|
@@ -20,5 +23,4 @@ declare namespace RadioGroupProps {
|
|
|
20
23
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/radio-group.html
|
|
21
24
|
*/
|
|
22
25
|
declare const RadioGroup: ComponentType<RadioGroupProps>
|
|
23
|
-
|
|
24
26
|
export { RadioGroup, RadioGroupProps }
|