@tarojs/components 3.5.5 → 3.5.6-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/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/MatchMedia.d.ts
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps } from './common'
|
|
3
|
-
|
|
4
3
|
interface MatchMediaProps extends StandardProps {
|
|
5
4
|
/** 页面最小宽度( px 为单位)
|
|
6
|
-
* @supported weapp
|
|
5
|
+
* @supported weapp, alipay
|
|
7
6
|
*/
|
|
8
|
-
minWidth?:
|
|
7
|
+
minWidth?: number
|
|
9
8
|
|
|
10
9
|
/** 页面最大宽度( px 为单位)
|
|
11
|
-
* @supported weapp
|
|
10
|
+
* @supported weapp, alipay
|
|
12
11
|
*/
|
|
13
12
|
maxWidth?: number
|
|
14
13
|
|
|
15
14
|
/** 页面宽度( px 为单位)
|
|
16
|
-
* @supported weapp
|
|
15
|
+
* @supported weapp, alipay
|
|
17
16
|
*/
|
|
18
17
|
width?: number
|
|
19
18
|
|
|
20
19
|
/** 页面最小高度( px 为单位)
|
|
21
|
-
* @supported weapp
|
|
20
|
+
* @supported weapp, alipay
|
|
22
21
|
*/
|
|
23
22
|
minHeight?: number
|
|
24
23
|
|
|
25
24
|
/** 页面最大高度( px 为单位)
|
|
26
|
-
* @supported weapp
|
|
25
|
+
* @supported weapp, alipay
|
|
27
26
|
*/
|
|
28
27
|
maxHeight?: number
|
|
29
28
|
|
|
30
29
|
/** 页面高度( px 为单位)
|
|
31
|
-
* @supported weapp
|
|
30
|
+
* @supported weapp, alipay
|
|
32
31
|
*/
|
|
33
32
|
height?: number
|
|
34
33
|
|
|
35
34
|
/** 屏幕方向( landscape 或 portrait )
|
|
36
|
-
* @supported weapp
|
|
35
|
+
* @supported weapp, alipay
|
|
37
36
|
*/
|
|
38
37
|
orientation?: string
|
|
39
38
|
}
|
|
@@ -75,5 +74,4 @@ interface MatchMediaProps extends StandardProps {
|
|
|
75
74
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/match-media.html
|
|
76
75
|
*/
|
|
77
76
|
declare const MatchMedia: ComponentType<MatchMediaProps>
|
|
78
|
-
|
|
79
77
|
export { MatchMedia, MatchMediaProps }
|
package/types/MovableArea.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps } from './common'
|
|
3
|
-
|
|
4
3
|
interface MovableAreaProps extends StandardProps {
|
|
5
4
|
/** 当里面的 movable-view 设置为支持双指缩放时,设置此值可将缩放手势生效区域修改为整个 movable-area
|
|
6
5
|
* @default false
|
|
7
|
-
* @supported weapp, tt
|
|
6
|
+
* @supported weapp, alipay, swan, tt, qq
|
|
8
7
|
*/
|
|
9
8
|
scaleArea?: boolean
|
|
10
9
|
}
|
|
@@ -33,5 +32,4 @@ interface MovableAreaProps extends StandardProps {
|
|
|
33
32
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/movable-area.html
|
|
34
33
|
*/
|
|
35
34
|
declare const MovableArea: ComponentType<MovableAreaProps>
|
|
36
|
-
|
|
37
35
|
export { MovableArea, MovableAreaProps }
|
package/types/MovableView.d.ts
CHANGED
|
@@ -1,141 +1,200 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
StandardProps,
|
|
4
|
+
CommonEventFunction,
|
|
5
|
+
TouchEventFunction,
|
|
6
|
+
} from './common'
|
|
4
7
|
interface MovableViewProps extends Omit<StandardProps, 'animation'> {
|
|
5
8
|
/** movable-view 的移动方向,属性值有`all`、`vertical`、`horizontal`、`none`
|
|
6
9
|
* @default none
|
|
7
|
-
* @supported weapp,
|
|
10
|
+
* @supported weapp, alipay, swan, tt, qq, rn
|
|
8
11
|
*/
|
|
9
12
|
direction?: 'all' | 'vertical' | 'horizontal' | 'none'
|
|
10
13
|
|
|
11
14
|
/** movable-view 是否带有惯性
|
|
12
15
|
* @default false
|
|
13
|
-
* @supported weapp, tt
|
|
16
|
+
* @supported weapp, alipay, swan, tt, qq
|
|
14
17
|
*/
|
|
15
18
|
inertia?: boolean
|
|
16
19
|
|
|
17
20
|
/** 超过可移动区域后,movable-view 是否还可以移动
|
|
18
21
|
* @default false
|
|
19
|
-
* @supported weapp, tt
|
|
22
|
+
* @supported weapp, alipay, swan, tt, qq
|
|
20
23
|
*/
|
|
21
24
|
outOfBounds?: boolean
|
|
22
25
|
|
|
23
26
|
/** 定义 x 轴方向的偏移,如果 x 的值不在可移动范围内,会自动移动到可移动范围;改变 x 的值会触发动画
|
|
24
|
-
* @supported weapp,
|
|
27
|
+
* @supported weapp, alipay, swan, tt, qq, rn
|
|
25
28
|
*/
|
|
26
29
|
x?: number | string
|
|
27
30
|
|
|
28
31
|
/** 定义 y 轴方向的偏移,如果 y 的值不在可移动范围内,会自动移动到可移动范围;改变 y 的值会触发动画
|
|
29
|
-
* @supported weapp,
|
|
32
|
+
* @supported weapp, alipay, swan, tt, qq, rn
|
|
30
33
|
*/
|
|
31
34
|
y?: number | string
|
|
32
35
|
|
|
33
36
|
/** 阻尼系数,用于控制x或y改变时的动画和过界回弹的动画,值越大移动越快
|
|
34
37
|
* @default 20
|
|
35
|
-
* @supported weapp, tt
|
|
38
|
+
* @supported weapp, alipay, swan, tt, qq
|
|
36
39
|
*/
|
|
37
40
|
damping?: number
|
|
38
41
|
|
|
39
42
|
/** 摩擦系数,用于控制惯性滑动的动画,值越大摩擦力越大,滑动越快停止;必须大于 0,否则会被设置成默认值
|
|
40
43
|
* @default 2
|
|
41
|
-
* @supported weapp, tt
|
|
44
|
+
* @supported weapp, alipay, swan, tt, qq
|
|
42
45
|
*/
|
|
43
46
|
friction?: number
|
|
44
47
|
|
|
45
48
|
/** 是否禁用
|
|
46
49
|
* @default false
|
|
47
|
-
* @supported weapp,
|
|
50
|
+
* @supported weapp, alipay, swan, tt, qq, rn
|
|
48
51
|
*/
|
|
49
52
|
disabled?: boolean
|
|
50
53
|
|
|
51
54
|
/** 是否支持双指缩放,默认缩放手势生效区域是在 movable-view 内
|
|
52
55
|
* @default false
|
|
53
|
-
* @supported weapp, tt
|
|
56
|
+
* @supported weapp, alipay, swan, tt, qq
|
|
54
57
|
*/
|
|
55
58
|
scale?: boolean
|
|
56
59
|
|
|
57
60
|
/** 定义缩放倍数最小值
|
|
58
61
|
* @default 0.5
|
|
59
|
-
* @supported weapp, tt
|
|
62
|
+
* @supported weapp, alipay, swan, tt, qq
|
|
60
63
|
*/
|
|
61
64
|
scaleMin?: number
|
|
62
65
|
|
|
63
66
|
/** 定义缩放倍数最大值
|
|
64
67
|
* @default 10
|
|
65
|
-
* @supported weapp, tt
|
|
68
|
+
* @supported weapp, alipay, swan, tt, qq
|
|
66
69
|
*/
|
|
67
70
|
scaleMax?: number
|
|
68
71
|
|
|
69
72
|
/** 定义缩放倍数,取值范围为 0.5 - 10
|
|
70
73
|
* @default 1
|
|
71
|
-
* @supported weapp, tt
|
|
74
|
+
* @supported weapp, alipay, swan, tt, qq
|
|
72
75
|
*/
|
|
73
76
|
scaleValue?: number
|
|
74
77
|
|
|
75
78
|
/** 是否使用动画
|
|
76
79
|
* @default true
|
|
77
|
-
* @supported weapp, tt
|
|
80
|
+
* @supported weapp, alipay, swan, tt, qq
|
|
78
81
|
*/
|
|
79
82
|
animation?: boolean
|
|
80
83
|
|
|
81
84
|
/** 拖动过程中触发的事件
|
|
82
|
-
* @supported weapp, tt
|
|
85
|
+
* @supported weapp, alipay, swan, tt, qq
|
|
83
86
|
*/
|
|
84
87
|
onChange?: CommonEventFunction<MovableViewProps.onChangeEventDetail>
|
|
85
88
|
|
|
86
89
|
/** 缩放过程中触发的事件
|
|
87
|
-
* @supported weapp, tt
|
|
90
|
+
* @supported weapp, alipay, swan, tt, qq
|
|
88
91
|
*/
|
|
89
92
|
onScale?: CommonEventFunction<MovableViewProps.onScaleEventDetail>
|
|
90
93
|
|
|
91
|
-
/**
|
|
94
|
+
/** 开始拖动时触发
|
|
95
|
+
* @supported rn
|
|
96
|
+
*/
|
|
97
|
+
onDragStart?: CommonEventFunction
|
|
98
|
+
|
|
99
|
+
/** 拖动结束时触发
|
|
100
|
+
* @supported rn
|
|
101
|
+
*/
|
|
102
|
+
onDragEnd?: CommonEventFunction
|
|
103
|
+
|
|
104
|
+
/** 初次手指触摸后移动为横向的移动时触发,如果 catch 此事件,则意味着 touchmove 事件也被catch
|
|
92
105
|
* @supported weapp, tt
|
|
93
106
|
*/
|
|
107
|
+
catchTouchmove?: CommonEventFunction
|
|
108
|
+
|
|
109
|
+
/** 触摸动作开始,事件会向父节点传递。
|
|
110
|
+
* 版本要求: 基础库 1.11.5 及以上
|
|
111
|
+
* @supported alipay
|
|
112
|
+
*/
|
|
113
|
+
onTouchStart?: CommonEventFunction
|
|
114
|
+
|
|
115
|
+
/** 触摸动作开始,事件仅作用于组件,不向父节点传递。
|
|
116
|
+
* 版本要求: 基础库 1.11.5 及以上
|
|
117
|
+
* @supported alipay
|
|
118
|
+
*/
|
|
119
|
+
catchTouchStart?: CommonEventFunction
|
|
120
|
+
|
|
121
|
+
/** 触摸移动事件,事件会向父节点传递。
|
|
122
|
+
* 版本要求: 基础库 1.11.5 及以上
|
|
123
|
+
* @supported alipay
|
|
124
|
+
*/
|
|
125
|
+
onTouchMove?: CommonEventFunction
|
|
126
|
+
|
|
127
|
+
/** 初次手指触摸后移动为横向的移动,如果 catch 此事件,则意味着 touchmove 事件也被 catch
|
|
128
|
+
* @supported swan
|
|
129
|
+
*/
|
|
94
130
|
onHTouchMove?: TouchEventFunction
|
|
95
131
|
|
|
96
132
|
/** 初次手指触摸后移动为纵向的移动,如果 catch 此事件,则意味着 touchmove 事件也被 catch
|
|
97
|
-
* @supported
|
|
133
|
+
* @supported swan
|
|
98
134
|
*/
|
|
99
135
|
onVTouchMove?: TouchEventFunction
|
|
100
|
-
|
|
101
|
-
|
|
136
|
+
|
|
137
|
+
/** 触摸移动事件,事件仅作用于组件,不向父节点传递。
|
|
138
|
+
* 版本要求: 基础库 1.11.5 及以上
|
|
139
|
+
* @supported alipay
|
|
102
140
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
141
|
+
catchTouchMove?: CommonEventFunction
|
|
142
|
+
|
|
143
|
+
/** 触摸动作结束,事件会向父节点传递。
|
|
144
|
+
* @supported alipay
|
|
106
145
|
*/
|
|
107
|
-
|
|
108
|
-
}
|
|
146
|
+
onTouchEnd?: CommonEventFunction
|
|
109
147
|
|
|
148
|
+
/** 触摸动作结束,事件仅作用于组件,不向父节点传递。
|
|
149
|
+
* @supported alipay
|
|
150
|
+
*/
|
|
151
|
+
catchTouchEnd?: CommonEventFunction
|
|
152
|
+
|
|
153
|
+
/** 触摸动作被打断,如来电提醒、弹窗。
|
|
154
|
+
* @supported alipay
|
|
155
|
+
*/
|
|
156
|
+
onTouchCancel?: CommonEventFunction
|
|
157
|
+
|
|
158
|
+
/** 拖动结束触发的事件
|
|
159
|
+
* @supported alipay
|
|
160
|
+
*/
|
|
161
|
+
onChangeEnd?: CommonEventFunction<MovableViewProps.onChangeEventDetail>
|
|
162
|
+
}
|
|
110
163
|
declare namespace MovableViewProps {
|
|
111
164
|
/** 拖动过程中触发的事件 */
|
|
112
165
|
interface TChangeSource {
|
|
113
166
|
/** 拖动 */
|
|
114
167
|
touch
|
|
168
|
+
|
|
115
169
|
/** 超出移动范围 */
|
|
116
170
|
'touch-out-of-bounds'
|
|
171
|
+
|
|
117
172
|
/** 超出移动范围后的回弹 */
|
|
118
173
|
'out-of-bounds'
|
|
174
|
+
|
|
119
175
|
/** 惯性 */
|
|
120
|
-
|
|
176
|
+
friction
|
|
177
|
+
|
|
121
178
|
/** setData */
|
|
122
179
|
''
|
|
123
180
|
}
|
|
124
|
-
|
|
125
181
|
interface onChangeEventDetail {
|
|
126
182
|
/** X 坐标 */
|
|
127
183
|
x: number
|
|
184
|
+
|
|
128
185
|
/** Y 坐标 */
|
|
129
186
|
y: number
|
|
187
|
+
|
|
130
188
|
/** 触发事件 */
|
|
131
189
|
source: keyof MovableViewProps.TChangeSource
|
|
132
190
|
}
|
|
133
|
-
|
|
134
191
|
interface onScaleEventDetail {
|
|
135
192
|
/** X 坐标 */
|
|
136
193
|
x: number
|
|
194
|
+
|
|
137
195
|
/** Y 坐标 */
|
|
138
196
|
y: number
|
|
197
|
+
|
|
139
198
|
/** 缩放比例 */
|
|
140
199
|
scale: number
|
|
141
200
|
}
|
|
@@ -165,5 +224,4 @@ declare namespace MovableViewProps {
|
|
|
165
224
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/movable-view.html
|
|
166
225
|
*/
|
|
167
226
|
declare const MovableView: ComponentType<MovableViewProps>
|
|
168
|
-
|
|
169
227
|
export { MovableView, MovableViewProps }
|
package/types/NavigationBar.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps, CommonEventFunction } from './common'
|
|
3
|
-
|
|
4
3
|
interface NavigationBarProps extends StandardProps {
|
|
5
4
|
/** 导航条标题
|
|
6
5
|
* @supported weapp
|
|
@@ -41,5 +40,4 @@ interface NavigationBarProps extends StandardProps {
|
|
|
41
40
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/open-data.html
|
|
42
41
|
*/
|
|
43
42
|
declare const NavigationBar: ComponentType<NavigationBarProps>
|
|
44
|
-
|
|
45
43
|
export { NavigationBar, NavigationBarProps }
|
package/types/Navigator.d.ts
CHANGED
|
@@ -1,118 +1,136 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps, CommonEventFunction } from './common'
|
|
3
|
-
|
|
4
3
|
interface NavigatorProps extends StandardProps {
|
|
5
4
|
/** 在哪个目标上发生跳转,默认当前小程序
|
|
6
5
|
* @default "self"
|
|
7
|
-
* @supported weapp, swan
|
|
6
|
+
* @supported weapp, swan, qq
|
|
8
7
|
*/
|
|
9
8
|
target?: keyof NavigatorProps.Target
|
|
10
9
|
|
|
11
10
|
/** 当前小程序内的跳转链接
|
|
12
|
-
* @supported weapp, swan,
|
|
11
|
+
* @supported weapp, alipay, swan, tt, qq, jd
|
|
13
12
|
*/
|
|
14
13
|
url?: string
|
|
15
14
|
|
|
16
15
|
/** 跳转方式
|
|
17
16
|
* @default "navigate"
|
|
18
|
-
* @supported weapp, swan,
|
|
17
|
+
* @supported weapp, alipay, swan, tt, qq, jd
|
|
19
18
|
*/
|
|
20
19
|
openType?: keyof NavigatorProps.OpenType
|
|
21
20
|
|
|
22
21
|
/** 当 open-type 为 'navigateBack' 时有效,表示回退的层数
|
|
23
|
-
* @supported weapp, swan, tt
|
|
22
|
+
* @supported weapp, swan, tt, qq, jd
|
|
24
23
|
*/
|
|
25
24
|
delta?: number
|
|
26
25
|
|
|
27
26
|
/** 当 `target="miniProgram"` 时有效,要打开的小程序 appId
|
|
28
|
-
* @supported weapp, swan
|
|
27
|
+
* @supported weapp, swan, qq
|
|
29
28
|
*/
|
|
30
29
|
appId?: string
|
|
31
30
|
|
|
32
31
|
/** 当 `target="miniProgram"` 时有效,打开的页面路径,如果为空则打开首页
|
|
33
|
-
* @supported weapp, swan
|
|
32
|
+
* @supported weapp, swan, qq
|
|
34
33
|
*/
|
|
35
34
|
path?: string
|
|
36
35
|
|
|
37
36
|
/** 当 `target="miniProgram"` 时有效,需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch()`,`App.onShow()` 中获取到这份数据.
|
|
38
|
-
* @supported weapp, swan
|
|
37
|
+
* @supported weapp, swan, qq
|
|
39
38
|
*/
|
|
40
39
|
extraData?: object
|
|
41
40
|
|
|
42
41
|
/** 当 `target="miniProgram"` 时有效,要打开的小程序版本
|
|
43
|
-
* @supported weapp, swan
|
|
42
|
+
* @supported weapp, swan, qq
|
|
44
43
|
*/
|
|
45
44
|
version?: keyof NavigatorProps.Version
|
|
46
45
|
|
|
47
46
|
/** 指定按下去的样式类。当 `hover-class="none"` 时,没有点击态效果
|
|
48
47
|
* @default "navigator-hover"
|
|
49
|
-
* @supported weapp, swan,
|
|
48
|
+
* @supported weapp, alipay, swan, tt, qq, jd
|
|
50
49
|
*/
|
|
51
50
|
hoverClass?: string
|
|
52
51
|
|
|
53
52
|
/** 指定是否阻止本节点的祖先节点出现点击态
|
|
54
53
|
* @default false
|
|
55
|
-
* @supported weapp, swan, tt
|
|
54
|
+
* @supported weapp, swan, tt, qq, jd
|
|
56
55
|
*/
|
|
57
56
|
hoverStopPropagation?: boolean
|
|
58
57
|
|
|
59
58
|
/** 按住后多久出现点击态,单位毫秒
|
|
60
59
|
* @default 50
|
|
61
|
-
* @supported weapp, swan,
|
|
60
|
+
* @supported weapp, alipay, swan, tt, qq, jd
|
|
62
61
|
*/
|
|
63
62
|
hoverStartTime?: number
|
|
64
63
|
|
|
65
64
|
/** 手指松开后点击态保留时间,单位毫秒
|
|
66
65
|
* @default 600
|
|
67
|
-
* @supported weapp, swan,
|
|
66
|
+
* @supported weapp, alipay, swan, tt, qq, jd
|
|
68
67
|
*/
|
|
69
68
|
hoverStayTime?: number
|
|
70
69
|
|
|
71
70
|
/** 当 `target="miniProgram"` 时有效,跳转小程序成功
|
|
72
|
-
* @supported weapp, swan
|
|
71
|
+
* @supported weapp, swan, qq
|
|
73
72
|
*/
|
|
74
73
|
onSuccess?: CommonEventFunction
|
|
75
74
|
|
|
76
75
|
/** 当 `target="miniProgram"` 时有效,跳转小程序失败
|
|
77
|
-
* @supported weapp, swan
|
|
76
|
+
* @supported weapp, swan, qq
|
|
78
77
|
*/
|
|
79
78
|
onFail?: CommonEventFunction
|
|
80
79
|
|
|
81
80
|
/** 当 `target="miniProgram"` 时有效,跳转小程序完成
|
|
82
|
-
* @supported weapp, swan
|
|
81
|
+
* @supported weapp, swan, qq
|
|
83
82
|
*/
|
|
84
83
|
onComplete?: CommonEventFunction
|
|
85
|
-
}
|
|
86
84
|
|
|
85
|
+
/** 当target="miniProgram"时有效,当传递该参数后,可以不传 app-id 和 path。链接可以通过【小程序菜单】->【复制链接】获取。
|
|
86
|
+
* @supported weapp
|
|
87
|
+
*/
|
|
88
|
+
shortLink?: string
|
|
89
|
+
|
|
90
|
+
/** 无障碍访问,(属性)元素的额外描述
|
|
91
|
+
* @supported qq
|
|
92
|
+
*/
|
|
93
|
+
ariaLabel?: string
|
|
94
|
+
}
|
|
87
95
|
declare namespace NavigatorProps {
|
|
88
96
|
/** target 的合法值 */
|
|
89
97
|
interface Target {
|
|
90
98
|
/** 当前小程序 */
|
|
91
99
|
self
|
|
100
|
+
|
|
92
101
|
/** 其它小程序 */
|
|
93
102
|
miniProgram
|
|
94
103
|
}
|
|
104
|
+
|
|
95
105
|
/** open-type 的合法值 */
|
|
96
106
|
interface OpenType {
|
|
97
107
|
/** 对应 Taro.navigateTo 或 Taro.navigateToMiniProgram 的功能 */
|
|
98
108
|
navigate
|
|
109
|
+
|
|
99
110
|
/** 对应 Taro.redirectTo 的功能 */
|
|
100
111
|
redirect
|
|
112
|
+
|
|
101
113
|
/** 对应 Taro.switchTab 的功能 */
|
|
102
114
|
switchTab
|
|
115
|
+
|
|
103
116
|
/** 对应 Taro.reLaunch 的功能 */
|
|
104
117
|
reLaunch
|
|
118
|
+
|
|
105
119
|
/** 对应 Taro.navigateBack 的功能 */
|
|
106
120
|
navigateBack
|
|
121
|
+
|
|
107
122
|
/** 退出小程序,`target="miniProgram"` 时生效 */
|
|
108
123
|
exit
|
|
109
124
|
}
|
|
125
|
+
|
|
110
126
|
/** version 的合法值 */
|
|
111
127
|
interface Version {
|
|
112
128
|
/** 开发版 */
|
|
113
129
|
develop
|
|
130
|
+
|
|
114
131
|
/** 体验版 */
|
|
115
132
|
trial
|
|
133
|
+
|
|
116
134
|
/** 正式版,仅在当前小程序为开发版或体验版时此参数有效;如果当前小程序是正式版,则打开的小程序必定是正式版。 */
|
|
117
135
|
release
|
|
118
136
|
}
|
|
@@ -124,5 +142,4 @@ declare namespace NavigatorProps {
|
|
|
124
142
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html
|
|
125
143
|
*/
|
|
126
144
|
declare const Navigator: ComponentType<NavigatorProps>
|
|
127
|
-
|
|
128
145
|
export { Navigator, NavigatorProps }
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps, CommonEventFunction } from './common'
|
|
3
|
-
|
|
4
3
|
interface OfficialAccountProps extends StandardProps {
|
|
5
4
|
/** 组件加载成功时触发
|
|
6
5
|
* @supported weapp
|
|
@@ -12,33 +11,42 @@ interface OfficialAccountProps extends StandardProps {
|
|
|
12
11
|
*/
|
|
13
12
|
onError?: CommonEventFunction<OfficialAccountProps.Detail>
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
declare namespace OfficialAccountProps {
|
|
17
15
|
/** detail 对象 */
|
|
18
16
|
interface Detail {
|
|
19
17
|
/** 状态码 */
|
|
20
18
|
status: number
|
|
19
|
+
|
|
21
20
|
/** 错误信息 */
|
|
22
21
|
errMsg: string
|
|
23
22
|
}
|
|
23
|
+
|
|
24
24
|
/** status 有效值 */
|
|
25
25
|
interface Status {
|
|
26
26
|
/** 网络错误 */
|
|
27
27
|
'-2'
|
|
28
|
+
|
|
28
29
|
/** 数据解析错误 */
|
|
29
30
|
'-1'
|
|
31
|
+
|
|
30
32
|
/** 加载成功 */
|
|
31
33
|
0
|
|
34
|
+
|
|
32
35
|
/** 小程序关注公众号功能被封禁 */
|
|
33
36
|
1
|
|
37
|
+
|
|
34
38
|
/** 关联公众号被封禁 */
|
|
35
39
|
2
|
|
40
|
+
|
|
36
41
|
/** 关联关系解除或未选中关联公众号 */
|
|
37
42
|
3
|
|
43
|
+
|
|
38
44
|
/** 未开启关注公众号功能 */
|
|
39
45
|
4
|
|
46
|
+
|
|
40
47
|
/** 场景值错误 */
|
|
41
48
|
5
|
|
49
|
+
|
|
42
50
|
/** 重复创建 */
|
|
43
51
|
6
|
|
44
52
|
}
|
|
@@ -59,5 +67,4 @@ declare namespace OfficialAccountProps {
|
|
|
59
67
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/official-account.html
|
|
60
68
|
*/
|
|
61
69
|
declare const OfficialAccount: ComponentType<OfficialAccountProps>
|
|
62
|
-
|
|
63
70
|
export { OfficialAccount, OfficialAccountProps }
|
package/types/OpenData.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
2
|
import { StandardProps, CommonEventFunction } from './common'
|
|
3
|
-
|
|
4
3
|
interface OpenDataProps extends StandardProps {
|
|
5
4
|
/** 开放数据类型
|
|
6
|
-
* @supported weapp, tt
|
|
5
|
+
* @supported weapp, swan, tt, qq
|
|
7
6
|
*/
|
|
8
7
|
type: keyof OpenDataProps.Type
|
|
8
|
+
|
|
9
9
|
/** 当 type="groupName" 时生效, 群id
|
|
10
10
|
* @supported weapp
|
|
11
11
|
*/
|
|
12
12
|
openGid?: string
|
|
13
|
+
|
|
13
14
|
/** 当 type="user*" 时生效,以哪种语言展示 userInfo
|
|
14
15
|
* @default "en"
|
|
15
|
-
* @supported weapp
|
|
16
|
+
* @supported weapp, qq
|
|
16
17
|
*/
|
|
17
18
|
lang?: keyof OpenDataProps.Lang
|
|
18
19
|
|
|
@@ -27,37 +28,66 @@ interface OpenDataProps extends StandardProps {
|
|
|
27
28
|
defaultAvatar?: string
|
|
28
29
|
|
|
29
30
|
/** 群名称或用户信息为空时触发
|
|
30
|
-
* @supported weapp, tt
|
|
31
|
+
* @supported weapp, tt, qq
|
|
31
32
|
*/
|
|
32
33
|
onError?: CommonEventFunction
|
|
33
|
-
}
|
|
34
34
|
|
|
35
|
+
/** 当数据为空且未设置默认值时,是否显示官方默认值
|
|
36
|
+
* @supported tt
|
|
37
|
+
*/
|
|
38
|
+
useEmptyValue?: string
|
|
39
|
+
|
|
40
|
+
/** 当 type=groupCloudStorage 时有效,群分享对应的 shareTicket
|
|
41
|
+
* @supported qq
|
|
42
|
+
*/
|
|
43
|
+
shareTicket?: string
|
|
44
|
+
|
|
45
|
+
/** 当 type=*CloudStorage 时有效,指定要拉取的 key 列表
|
|
46
|
+
* @supported qq
|
|
47
|
+
*/
|
|
48
|
+
keyList?: string
|
|
49
|
+
|
|
50
|
+
/** 当 type=*CloudStorage 时有效,从主域透传给开放数据域的数据,会自动注入到自定义开放数据域组件的 properties 中
|
|
51
|
+
* @supported qq
|
|
52
|
+
*/
|
|
53
|
+
componentData?: string
|
|
54
|
+
}
|
|
35
55
|
declare namespace OpenDataProps {
|
|
36
56
|
/** type 的合法值 */
|
|
37
57
|
interface Type {
|
|
38
58
|
/** 拉取群名称 */
|
|
39
59
|
groupName
|
|
60
|
+
|
|
40
61
|
/** 用户昵称 */
|
|
41
62
|
userNickName
|
|
63
|
+
|
|
42
64
|
/** 用户头像 */
|
|
43
65
|
userAvatarUrl
|
|
66
|
+
|
|
44
67
|
/** 用户性别 */
|
|
45
68
|
userGender
|
|
69
|
+
|
|
46
70
|
/** 用户所在城市 */
|
|
47
71
|
userCity
|
|
72
|
+
|
|
48
73
|
/** 用户所在省份 */
|
|
49
74
|
userProvince
|
|
75
|
+
|
|
50
76
|
/** 用户所在国家 */
|
|
51
77
|
userCountry
|
|
78
|
+
|
|
52
79
|
/** 用户的语言 */
|
|
53
80
|
userLanguage
|
|
54
81
|
}
|
|
82
|
+
|
|
55
83
|
/** lang 的合法值 */
|
|
56
84
|
interface Lang {
|
|
57
85
|
/** 英文 */
|
|
58
86
|
en
|
|
87
|
+
|
|
59
88
|
/** 简体中文 */
|
|
60
89
|
zh_CN
|
|
90
|
+
|
|
61
91
|
/** 繁体中文 */
|
|
62
92
|
zh_TW
|
|
63
93
|
}
|
|
@@ -85,5 +115,4 @@ declare namespace OpenDataProps {
|
|
|
85
115
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/open-data.html
|
|
86
116
|
*/
|
|
87
117
|
declare const OpenData: ComponentType<OpenDataProps>
|
|
88
|
-
|
|
89
118
|
export { OpenData, OpenDataProps }
|
package/types/PageContainer.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ComponentType } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
StandardProps,
|
|
4
|
+
CommonEventFunction,
|
|
5
|
+
} from './common'
|
|
4
6
|
interface PageContainerProps extends StandardProps {
|
|
5
7
|
/** 是否显示容器组件
|
|
6
8
|
* @default false
|
|
@@ -38,12 +40,6 @@ interface PageContainerProps extends StandardProps {
|
|
|
38
40
|
*/
|
|
39
41
|
round?: boolean
|
|
40
42
|
|
|
41
|
-
/** 是否在下滑一段距离后关闭
|
|
42
|
-
* @default false
|
|
43
|
-
* @supported weapp
|
|
44
|
-
*/
|
|
45
|
-
closeOnSlideDown?: boolean
|
|
46
|
-
|
|
47
43
|
/** 自定义遮罩层样式
|
|
48
44
|
* @supported weapp, rn
|
|
49
45
|
*/
|
|
@@ -88,17 +84,25 @@ interface PageContainerProps extends StandardProps {
|
|
|
88
84
|
* @supported weapp
|
|
89
85
|
*/
|
|
90
86
|
onClickOverlay?: CommonEventFunction
|
|
91
|
-
}
|
|
92
87
|
|
|
88
|
+
/** 是否在下滑一段距离后关闭
|
|
89
|
+
* @supported weapp
|
|
90
|
+
* @default false
|
|
91
|
+
*/
|
|
92
|
+
closeOnSlideDown?: string
|
|
93
|
+
}
|
|
93
94
|
declare namespace PageContainerProps {
|
|
94
95
|
/** 弹出位置 */
|
|
95
96
|
interface Position {
|
|
96
97
|
/** 上方弹出 */
|
|
97
98
|
top
|
|
99
|
+
|
|
98
100
|
/** 下方弹出 */
|
|
99
101
|
bottom
|
|
102
|
+
|
|
100
103
|
/** 右边弹出 */
|
|
101
104
|
right
|
|
105
|
+
|
|
102
106
|
/** 中央弹出 */
|
|
103
107
|
center
|
|
104
108
|
}
|
|
@@ -117,5 +121,4 @@ declare namespace PageContainerProps {
|
|
|
117
121
|
* @see https://developers.weixin.qq.com/miniprogram/dev/component/page-container.html
|
|
118
122
|
*/
|
|
119
123
|
declare const PageContainer: ComponentType<PageContainerProps>
|
|
120
|
-
|
|
121
124
|
export { PageContainer, PageContainerProps }
|